From 8b97a90fb962022c262ba09a1a83d3a57dba986f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LAGACHE?= Date: Wed, 17 Jun 2026 09:46:52 +0200 Subject: [PATCH] fix(onboarding): call next() in finish step so onFlowComplete fires and cookie is written StepFinish was calling router.push() directly, bypassing the next() call that triggers onFlowComplete in OnboardingClient, preventing the onboarding-done cookie from being written and causing infinite redirect loops. Co-Authored-By: Claude Sonnet 4.6 --- src/features/onboarding/steps/step-finish.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/onboarding/steps/step-finish.tsx b/src/features/onboarding/steps/step-finish.tsx index 426568a1..c693ad00 100644 --- a/src/features/onboarding/steps/step-finish.tsx +++ b/src/features/onboarding/steps/step-finish.tsx @@ -1,13 +1,13 @@ "use client"; import { useEffect, useRef } from "react"; -import { useRouter } from "next/navigation"; +import { useOnboarding } from "@onboardjs/react"; import confetti from "canvas-confetti"; import { CheckCircle2 } from "lucide-react"; import { Button } from "@/components/ui/button"; export const StepFinish = () => { - const router = useRouter(); + const { next } = useOnboarding(); const fired = useRef(false); useEffect(() => { @@ -21,7 +21,7 @@ export const StepFinish = () => {

You're all set!

Your workspace is ready to use.

-