mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-25 06:14:25 +00:00
chore: fix member list
This commit is contained in:
11
frontend/web/src/utils/user.ts
Normal file
11
frontend/web/src/utils/user.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Role } from "@/types/proto/api/v2/user_service";
|
||||
|
||||
export const convertRoleFromPb = (role: Role): string => {
|
||||
if (role === Role.ADMIN) {
|
||||
return "Admin";
|
||||
} else if (role === Role.USER) {
|
||||
return "User";
|
||||
} else {
|
||||
return "Unknown";
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user