first round of review

This commit is contained in:
counterweight 2025-12-20 11:43:32 +01:00
parent 870804e7b9
commit 23049da55a
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
15 changed files with 325 additions and 182 deletions

View file

@ -7,10 +7,13 @@ import { useAuth } from "../../auth-context";
export default function SignupWithCodePage() {
const params = useParams();
const router = useRouter();
const { user } = useAuth();
const { user, isLoading } = useAuth();
const code = params.code as string;
useEffect(() => {
// Wait for auth check to complete before redirecting
if (isLoading) return;
if (user) {
// Already logged in, redirect to home
router.replace("/");
@ -18,7 +21,7 @@ export default function SignupWithCodePage() {
// Redirect to signup with code as query param
router.replace(`/signup?code=${encodeURIComponent(code)}`);
}
}, [user, code, router]);
}, [user, isLoading, code, router]);
return (
<main style={{