Skip to content

Commit

Permalink
fix: fix isAdmin check
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Dec 18, 2024
1 parent eee0661 commit 1bfb2ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const AuthContextProvider: React.FC<Props> = (props) => {
value={{
currentUserId: props.currentUserId,
currentEmail: props.currentEmail,
isAdmin: !!props.currentEmail?.endsWith('@internet.ac.jp'),
isAdmin:
(process.env.NEXT_PUBLIC_BASE_URL ?? '').includes('//localhost:') ||
!!props.currentEmail?.endsWith('@internet.ac.jp'),
}}
>
{props.children}
Expand Down

0 comments on commit 1bfb2ec

Please sign in to comment.