12 lines
290 B
TypeScript
12 lines
290 B
TypeScript
import { isAdmin } from 'common/envs/constants'
|
|
import { usePrivateUser } from './use-user'
|
|
|
|
export const useAdmin = () => {
|
|
const privateUser = usePrivateUser()
|
|
return isAdmin(privateUser?.email || '')
|
|
}
|
|
|
|
export const useDev = () => {
|
|
return process.env.NODE_ENV === 'development'
|
|
}
|