From a5d393d2381b24abcb296151aea29b5c31c721fc Mon Sep 17 00:00:00 2001 From: "Yeyang (Justin) Sun" Date: Mon, 19 Feb 2024 04:03:05 +1030 Subject: [PATCH] fix(signin): header buttons doesn't change after signin (#75) --- src/app/(account)/signin/page.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/(account)/signin/page.tsx b/src/app/(account)/signin/page.tsx index 5690b6ed..fb111125 100644 --- a/src/app/(account)/signin/page.tsx +++ b/src/app/(account)/signin/page.tsx @@ -6,7 +6,6 @@ import FancyRectangle from '@/components/FancyRectangle'; import { useSignIn } from '@clerk/clerk-react'; import { zodResolver } from '@hookform/resolvers/zod'; import Link from 'next/link'; -import { useRouter } from 'next/navigation'; import { useForm } from 'react-hook-form'; import { FcGoogle } from 'react-icons/fc'; import { z } from 'zod'; @@ -26,8 +25,6 @@ export default function SignInPage() { resolver: zodResolver(signInSchema), }); - const router = useRouter(); - const handleSignIn = form.handleSubmit(async ({ email, password }) => { if (!isLoaded) return; try { @@ -38,7 +35,7 @@ export default function SignInPage() { if (result.status === 'complete') { await setActive({ session: result.createdSessionId }); - router.push('/'); + location.href = '/'; } else { console.log(result); }