diff --git a/src/app/(account)/signin/page.tsx b/src/app/(account)/signin/page.tsx index 5690b6ed..332bb7d7 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,6 @@ export default function SignInPage() { if (result.status === 'complete') { await setActive({ session: result.createdSessionId }); - router.push('/'); } else { console.log(result); } diff --git a/src/components/Header.tsx b/src/components/Header.tsx index ad7ffcd5..9972d5a0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -28,12 +28,7 @@ export default function Header() { }); const checkUserPaid = useSWR<{ paid: boolean }>(['payment'], fetcher.get.query, { - isPaused: () => { - if (clerkUser.isLoaded && !clerkUser.isSignedIn) { - return true; - } - return !checkUserExists.data?.exists; - }, + isPaused: () => clerkUser.isLoaded && !clerkUser.isSignedIn, }); const [isScrolled, setIsScrolled] = useState(false); @@ -161,16 +156,15 @@ export default function Header() { Continue Signing Up )} - {checkUserExists.data?.exists && - !checkUserPaid.data?.paid && ( - - )} + {!checkUserPaid.data?.paid && ( + + )}