From 50bad620ced9b80ecc5d5d689ee0c15452d801ae Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Sat, 18 Apr 2026 20:27:49 +0100 Subject: [PATCH] fix: 404 on profiles when not logged in --- frontend/src/pages/profile/layout.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }