diff --git a/frontend/src/pages/profile/layout.tsx b/frontend/src/pages/profile/layout.tsx index 7b762b2..31b2bd1 100644 --- a/frontend/src/pages/profile/layout.tsx +++ b/frontend/src/pages/profile/layout.tsx @@ -15,8 +15,9 @@ export default function ProfileLayout() { useEffect(() => { if ($session === undefined) return; // session still loading - if ($session === null) { - // not logged in + + const userId = id ?? $session?.user?.id; + if (!userId) { navigate("/404"); return; }