You've already forked AstralRinth
forked from didirus/AstralRinth
Migrate to Turborepo (#1251)
This commit is contained in:
9
apps/frontend/src/helpers/users.js
Normal file
9
apps/frontend/src/helpers/users.js
Normal file
@@ -0,0 +1,9 @@
|
||||
export const getUserLink = (user) => {
|
||||
return `/user/${user.username}`
|
||||
}
|
||||
|
||||
export const isStaff = (user) => {
|
||||
return user && STAFF_ROLES.includes(user.role)
|
||||
}
|
||||
|
||||
export const STAFF_ROLES = ['moderator', 'admin']
|
||||
Reference in New Issue
Block a user