hydration fix
This commit is contained in:
parent
231b65dc32
commit
00f7b5b086
@ -263,9 +263,8 @@ export default function Header({ setGlobalLoggingOut }: HeaderProps) {
|
||||
const isLoggedIn = !!user
|
||||
const userPresent = mounted && isLoggedIn
|
||||
|
||||
// NEW: detect admin role across common shapes, but only after mount
|
||||
const isAdmin =
|
||||
mounted &&
|
||||
// NEW: detect admin role across common shapes (guarded by mount to avoid SSR/CSR mismatch)
|
||||
const rawIsAdmin =
|
||||
!!user &&
|
||||
(
|
||||
(user as any)?.role === 'admin' ||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user