2022-05-09 13:04:36 +00:00
|
|
|
import { isAdmin } from 'common/envs/constants'
|
2022-08-12 20:41:00 +00:00
|
|
|
import { usePrivateUser } from './use-user'
|
2022-02-09 18:58:33 +00:00
|
|
|
|
|
|
|
export const useAdmin = () => {
|
2022-08-12 20:41:00 +00:00
|
|
|
const privateUser = usePrivateUser()
|
2022-02-27 07:29:33 +00:00
|
|
|
return isAdmin(privateUser?.email || '')
|
2022-02-09 18:58:33 +00:00
|
|
|
}
|
2022-08-22 17:48:21 +00:00
|
|
|
|
|
|
|
export const useDev = () => {
|
|
|
|
return process.env.NODE_ENV === 'development'
|
|
|
|
}
|