Removed unused code (#3198)
This commit is contained in:
parent
42e8f773fb
commit
e84ff41654
2 changed files with 0 additions and 15 deletions
|
@ -17,14 +17,12 @@ import { emailRegexPattern } from "../util";
|
|||
import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
|
||||
import { useAdminClient, useFetch } from "../context/auth/AdminClient";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
||||
import type GlobalRequestResult from "@keycloak/keycloak-admin-client/lib/defs/globalRequestResult";
|
||||
|
||||
type RevocationModalProps = {
|
||||
handleModalToggle: () => void;
|
||||
activeClients: ClientRepresentation[];
|
||||
save: () => void;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
|
||||
import { DropdownItem, PageSection } from "@patternfly/react-core";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
@ -22,9 +21,6 @@ export default function SessionsSection() {
|
|||
const { realm } = useRealm();
|
||||
|
||||
const [revocationModalOpen, setRevocationModalOpen] = useState(false);
|
||||
const [activeClientDetails, setActiveClientDetails] = useState<
|
||||
ClientRepresentation[]
|
||||
>([]);
|
||||
const [noSessions, setNoSessions] = useState(false);
|
||||
|
||||
const handleRevocationModalToggle = () => {
|
||||
|
@ -43,14 +39,6 @@ export default function SessionsSection() {
|
|||
|
||||
setNoSessions(clientSessions.length === 0);
|
||||
|
||||
const allClients = await adminClient.clients.find();
|
||||
|
||||
const getActiveClientDetails = allClients.filter((x) =>
|
||||
activeClients.map((y) => y.id).includes(x.id)
|
||||
);
|
||||
|
||||
setActiveClientDetails(getActiveClientDetails);
|
||||
|
||||
const userIds = Array.from(
|
||||
new Set(clientSessions.map((session) => session.userId))
|
||||
);
|
||||
|
@ -110,7 +98,6 @@ export default function SessionsSection() {
|
|||
{revocationModalOpen && (
|
||||
<RevocationModal
|
||||
handleModalToggle={handleRevocationModalToggle}
|
||||
activeClients={activeClientDetails}
|
||||
save={() => {
|
||||
handleRevocationModalToggle();
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue