diff --git a/js/apps/admin-ui/src/components/users/UserDataTable.tsx b/js/apps/admin-ui/src/components/users/UserDataTable.tsx
index c73b7b6c30f..b77aadaf917 100644
--- a/js/apps/admin-ui/src/components/users/UserDataTable.tsx
+++ b/js/apps/admin-ui/src/components/users/UserDataTable.tsx
@@ -49,6 +49,51 @@ export type UserAttribute = {
value: string;
};
+const UserDetailLink = (user: BruteUser) => {
+ const { realm } = useRealm();
+ return (
+
+ {user.username}
+
+ );
+};
+
+type StatusRowProps = {
+ user: BruteUser;
+};
+
+const StatusRow = ({ user }: StatusRowProps) => {
+ const { t } = useTranslation();
+ return (
+ <>
+ {!user.enabled && (
+ }>
+ {t("disabled")}
+
+ )}
+ {user.bruteForceStatus?.disabled && (
+ }>
+ {t("temporaryLocked")}
+
+ )}
+ >
+ );
+};
+
+const ValidatedEmail = (user: UserRepresentation) => {
+ const { t } = useTranslation();
+ return (
+ <>
+ {!user.emailVerified && (
+
+
+
+ )}{" "}
+ {emptyFormatter()(user.email)}
+ >
+ );
+};
+
export function UserDataTable() {
const { t } = useTranslation();
const { addAlert, addError } = useAlerts();
@@ -96,15 +141,6 @@ export function UserDataTable() {
[],
);
- const UserDetailLink = (user: UserRepresentation) => (
-
- {user.username}
-
- );
-
const loader = async (first?: number, max?: number, search?: string) => {
const params: { [name: string]: string | number } = {
first: first!,
@@ -170,40 +206,6 @@ export function UserDataTable() {
},
});
- const StatusRow = (user: BruteUser) => {
- return (
- <>
- {!user.enabled && (
- }>
- {t("disabled")}
-
- )}
- {user.bruteForceStatus?.disabled && (
- }>
- {t("temporaryLocked")}
-
- )}
- {user.enabled && !user.bruteForceStatus?.disabled && "—"}
- >
- );
- };
-
- const ValidatedEmail = (user: UserRepresentation) => {
- return (
- <>
- {!user.emailVerified && (
- {t("notVerified")}>}
- >
-
-
- )}{" "}
- {emptyFormatter()(user.email)}
- >
- );
- };
-
const goToCreate = () => navigate(toAddUser({ realm: realmName }));
if (!userStorage || !realm) {
@@ -386,11 +388,6 @@ export function UserDataTable() {
displayKey: "firstName",
cellFormatters: [emptyFormatter()],
},
- {
- name: "status",
- displayKey: "status",
- cellRenderer: StatusRow,
- },
]}
/>
>