If you are not redirected automatically in the next 5 seconds, please click the button below
{showButton ? ( ) : (Please wait, we are logging you in...
)}"use client"; import Link from "next/link"; import { useUser } from "@/hooks/useUser"; import { use, useState } from "react"; import { useMount, useTimeoutFn } from "react-use"; import { Button } from "@/components/ui/button"; export default function AuthCallback({ searchParams, }: { searchParams: Promise<{ code: string }>; }) { const [showButton, setShowButton] = useState(false); const { code } = use(searchParams); const { loginFromCode } = useUser(); useMount(async () => { if (code) { await loginFromCode(code); } }); useTimeoutFn( () => setShowButton(true), 7000 // Show button after 5 seconds ); return (
Login In Progress...
Wait a moment while we log you in with your code.
If you are not redirected automatically in the next 5 seconds, please click the button below
{showButton ? ( ) : (Please wait, we are logging you in...
)}