diff --git a/src/app/components/header/buttons.tsx b/src/app/components/header/buttons.tsx
index c064afd3..66e0efb9 100644
--- a/src/app/components/header/buttons.tsx
+++ b/src/app/components/header/buttons.tsx
@@ -146,6 +146,17 @@ export function getButtons({
key="settings"
/>,
,
+ isAdmin ? (
+
+ }
+ value="admin"
+ href="/admin"
+ />
+
+ ) : undefined,
isAuthenticated === true ? (
- ) : undefined,
- isAdmin ? (
-
- }
- value="admin"
- href="/admin"
- />
-
) : undefined
].filter(Boolean)
}
diff --git a/src/lib/use-session-swr.ts b/src/lib/use-session-swr.ts
index f86cab77..27da0c24 100644
--- a/src/lib/use-session-swr.ts
+++ b/src/lib/use-session-swr.ts
@@ -24,7 +24,7 @@ export function useSessionSWR(swrOpts: SWRConfiguration = {}) {
isAuthenticated: session?.user?.id ? true : isLoading ? undefined : false,
/** undefined while loading */
isAdmin:
- session?.user?.id === "admin" ? true : isLoading ? undefined : false,
+ session?.user?.role === "admin" ? true : isLoading ? undefined : false,
userId: session?.user?.id
}
}