import { useState } from "react"; // import { useRouter } from "next/navigation"; import { Auth } from "~/components/AuthForm"; import { PageHead } from "~/components/PageHead"; // import { api } from "~/utils/api"; export default function SignupPage() { // const router = useRouter(); const [isMagicLinkSent, setIsMagicLinkSent] = useState(false); const [magicLinkRecipient, setMagicLinkRecipient] = useState(""); const handleMagicLinkSent = (value: boolean, recipient: string) => { setIsMagicLinkSent(value); setMagicLinkRecipient(recipient); }; // const authCookieExists = document.cookie // .split("; ") // .some((cookie) => cookie.includes("auth-token")); // const { data } = api.auth.getUser.useQuery(undefined, { // enabled: authCookieExists ? true : false, // }); // if (data?.id) router.push("/boards"); return ( <>

kan.bn

{isMagicLinkSent ? "Check your inbox" : "Get started"}

{isMagicLinkSent ? (

{`Click on the link we've sent to ${magicLinkRecipient} to sign in.`}

) : (
)}
); }