parent
6b993ea93a
commit
ba4765fdc5
1 changed files with 0 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useHistory } from "react-router-dom";
|
|
||||||
import {
|
import {
|
||||||
AlertVariant,
|
AlertVariant,
|
||||||
Button,
|
Button,
|
||||||
|
@ -10,12 +9,10 @@ import {
|
||||||
|
|
||||||
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
|
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
|
||||||
import { useAdminClient } from "../context/auth/AdminClient";
|
import { useAdminClient } from "../context/auth/AdminClient";
|
||||||
import { useRealm } from "../context/realm-context/RealmContext";
|
|
||||||
import { useAlerts } from "../components/alert/Alerts";
|
import { useAlerts } from "../components/alert/Alerts";
|
||||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||||
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
||||||
import { emptyFormatter } from "../util";
|
import { emptyFormatter } from "../util";
|
||||||
import { toAddUser } from "../user/routes/AddUser";
|
|
||||||
import { differenceBy } from "lodash-es";
|
import { differenceBy } from "lodash-es";
|
||||||
|
|
||||||
type MemberModalProps = {
|
type MemberModalProps = {
|
||||||
|
@ -29,10 +26,6 @@ export const MemberModal = ({ groupId, onClose }: MemberModalProps) => {
|
||||||
const { addAlert, addError } = useAlerts();
|
const { addAlert, addError } = useAlerts();
|
||||||
const [selectedRows, setSelectedRows] = useState<UserRepresentation[]>([]);
|
const [selectedRows, setSelectedRows] = useState<UserRepresentation[]>([]);
|
||||||
|
|
||||||
const history = useHistory();
|
|
||||||
const { realm } = useRealm();
|
|
||||||
const goToCreate = () => history.push(toAddUser({ realm }));
|
|
||||||
|
|
||||||
const loader = async (first?: number, max?: number, search?: string) => {
|
const loader = async (first?: number, max?: number, search?: string) => {
|
||||||
const members = await adminClient.groups.listMembers({ id: groupId });
|
const members = await adminClient.groups.listMembers({ id: groupId });
|
||||||
const params: { [name: string]: string | number } = {
|
const params: { [name: string]: string | number } = {
|
||||||
|
@ -101,8 +94,6 @@ export const MemberModal = ({ groupId, onClose }: MemberModalProps) => {
|
||||||
<ListEmptyState
|
<ListEmptyState
|
||||||
message={t("users:noUsersFound")}
|
message={t("users:noUsersFound")}
|
||||||
instructions={t("users:emptyInstructions")}
|
instructions={t("users:emptyInstructions")}
|
||||||
primaryActionText={t("users:createNewUser")}
|
|
||||||
onPrimaryAction={goToCreate}
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
|
|
Loading…
Reference in a new issue