diff --git a/frontend/src/pages/profile/layout.tsx b/frontend/src/pages/profile/layout.tsx
index 5a16395..23265eb 100644
--- a/frontend/src/pages/profile/layout.tsx
+++ b/frontend/src/pages/profile/layout.tsx
@@ -42,11 +42,11 @@ export default function ProfileLayout() {
return
Loading...
;
}
- const currentUser = user ?? $session?.user;
+ const sessionUserId = $session?.user?.id ? Number($session.user.id) : null;
const page = location.pathname;
- const isAdmin = currentUser?.id === Number(import.meta.env.VITE_ADMIN_USER_ID);
- const isContributor = import.meta.env.VITE_CONTRIBUTORS_USER_IDS?.split(",").includes(user?.id);
- const isOwnProfile = currentUser?.id === user?.id;
+ const isAdmin = sessionUserId === Number(import.meta.env.VITE_ADMIN_USER_ID);
+ const isContributor = import.meta.env.VITE_CONTRIBUTORS_USER_IDS?.split(",").includes(String(user?.id));
+ const isOwnProfile = sessionUserId === user?.id;
return (