feat(onboarding): add finish step with confetti

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Théo LAGACHE
2026-06-17 09:32:56 +02:00
co-authored by Claude Sonnet 4.6
parent 4c4f2a4783
commit 7c1707530d
3 changed files with 47 additions and 0 deletions
@@ -0,0 +1,29 @@
"use client";
import { useEffect, useRef } from "react";
import { useRouter } from "next/navigation";
import confetti from "canvas-confetti";
import { CheckCircle2 } from "lucide-react";
import { Button } from "@/components/ui/button";
export const StepFinish = () => {
const router = useRouter();
const fired = useRef(false);
useEffect(() => {
if (fired.current) return;
fired.current = true;
confetti({ particleCount: 150, spread: 80, origin: { y: 0.6 } });
}, []);
return (
<div className="flex flex-col items-center justify-center gap-4 h-full text-center">
<CheckCircle2 className="size-16 text-green-500" />
<h1 className="text-2xl font-semibold">You&apos;re all set!</h1>
<p className="text-sm text-muted-foreground">Your workspace is ready to use.</p>
<Button type="button" onClick={() => router.push("/dashboard/home")}>
Go to dashboard
</Button>
</div>
);
};