fix: 404 on profiles when not logged in

This commit is contained in:
trafficlunar 2026-04-18 20:27:49 +01:00 committed by GitHub
parent 94eef81b93
commit 50bad620ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,8 +15,9 @@ export default function ProfileLayout() {
useEffect(() => { useEffect(() => {
if ($session === undefined) return; // session still loading if ($session === undefined) return; // session still loading
if ($session === null) {
// not logged in const userId = id ?? $session?.user?.id;
if (!userId) {
navigate("/404"); navigate("/404");
return; return;
} }