mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
17 lines
428 B
TypeScript
17 lines
428 B
TypeScript
import { UserBasicData } from './networking/queries/useGetViewerQuery'
|
|
|
|
const VIP_USERS = ['jacksonh', 'satindar', 'hongbo', 'nat']
|
|
|
|
export const isVipUser = (user: UserBasicData): boolean => {
|
|
return VIP_USERS.includes(user.profile.username)
|
|
}
|
|
|
|
export const userHasFeature = (
|
|
user: UserBasicData | undefined,
|
|
feature: string
|
|
): boolean => {
|
|
if (!user) {
|
|
return false
|
|
}
|
|
return user.features.includes(feature)
|
|
}
|