From 495c9e917d3ccf75e035c0fe343e5bd477420436 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Fri, 22 Apr 2022 10:48:47 +0200 Subject: [PATCH] Fixed link to client (#2489) --- src/sessions/SessionsSection.tsx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/sessions/SessionsSection.tsx b/src/sessions/SessionsSection.tsx index afcee05f70..77f2eed34d 100644 --- a/src/sessions/SessionsSection.tsx +++ b/src/sessions/SessionsSection.tsx @@ -14,24 +14,15 @@ import { useAdminClient } from "../context/auth/AdminClient"; import { RevocationModal } from "./RevocationModal"; import { LogoutAllSessionsModal } from "./LogoutAllSessionsModal"; import helpUrls from "../help-urls"; +import { toClient } from "../clients/routes/Client"; +import { useRealm } from "../context/realm-context/RealmContext"; import "./SessionsSection.css"; -const Clients = (row: UserSessionRepresentation) => { - return ( - <> - {Object.values(row.clients!).map((client) => ( - - {client} - - ))} - - ); -}; - export default function SessionsSection() { const { t } = useTranslation("sessions"); const adminClient = useAdminClient(); + const { realm } = useRealm(); const [revocationModalOpen, setRevocationModalOpen] = useState(false); const [logoutAllSessionsModalOpen, setLogoutAllSessionsModalOpen] = useState(false); @@ -80,6 +71,20 @@ export default function SessionsSection() { return userSessions; }; + const Clients = (row: UserSessionRepresentation) => ( + <> + {Object.entries(row.clients!).map(([clientId, client]) => ( + + {client} + + ))} + + ); + const dropdownItems = [