11 lines
291 B
TypeScript
11 lines
291 B
TypeScript
export const roleLabels: Record<string, string> = {
|
|
admin: "管理员",
|
|
product_manager: "产品经理",
|
|
reviewer: "审核员",
|
|
普通用户: "普通用户",
|
|
};
|
|
|
|
export function roleLabel(role: string | null | undefined) {
|
|
return role ? (roleLabels[role] ?? role) : "未登录";
|
|
}
|