1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-11-15 22:41:05 +03:00
Files
nginx-proxy-manager/frontend/src/components/Table/Formatter/RolesFormatter.tsx
2025-10-02 23:06:51 +10:00

21 lines
363 B
TypeScript

import { T } from "src/locale";
interface Props {
roles: string[];
}
export function RolesFormatter({ roles }: Props) {
const r = roles || [];
if (r.length === 0) {
r[0] = "standard-user";
}
return (
<>
{r.map((role: string) => (
<span key={role} className="badge bg-yellow-lt me-1">
<T id={`role.${role}`} />
</span>
))}
</>
);
}