ebed7c15c0
* Add Firebase config for TheoremOne * Fix build * Check in Firebase indexes * Whitelist admins and new users by email
9 lines
249 B
TypeScript
9 lines
249 B
TypeScript
import { isAdmin } from '../../common/access'
|
|
import { usePrivateUser, useUser } from './use-user'
|
|
|
|
export const useAdmin = () => {
|
|
const user = useUser()
|
|
const privateUser = usePrivateUser(user?.id)
|
|
return isAdmin(privateUser?.email || '')
|
|
}
|