acc9c84e2e
* Configure functions module to allow absolute imports * Convert common imports in functions to be absolute * Convert common imports in web to be absolute * Convert lib imports in web to be absolute * Convert hooks imports in web to be absolute * Convert components imports in web to be absolute
9 lines
251 B
TypeScript
9 lines
251 B
TypeScript
import { isAdmin } from 'common/envs/constants'
|
|
import { usePrivateUser, useUser } from './use-user'
|
|
|
|
export const useAdmin = () => {
|
|
const user = useUser()
|
|
const privateUser = usePrivateUser(user?.id)
|
|
return isAdmin(privateUser?.email || '')
|
|
}
|