Skip to content

Commit

Permalink
fix(signin): header buttons doesn't change after signin (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 authored Feb 18, 2024
1 parent 3d61442 commit a5d393d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/(account)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 {
Expand All @@ -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);
}
Expand Down

0 comments on commit a5d393d

Please sign in to comment.