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 = [