manifold/web/hooks/use-admin.ts

8 lines
209 B
TypeScript
Raw Normal View History

import { isAdmin } from 'common/envs/constants'
import { usePrivateUser } from './use-user'
2022-02-09 18:58:33 +00:00
export const useAdmin = () => {
const privateUser = usePrivateUser()
return isAdmin(privateUser?.email || '')
2022-02-09 18:58:33 +00:00
}