diff --git a/js/apps/admin-ui/src/sessions/SessionsSection.tsx b/js/apps/admin-ui/src/sessions/SessionsSection.tsx index d107f78239f..fcca7f3082a 100644 --- a/js/apps/admin-ui/src/sessions/SessionsSection.tsx +++ b/js/apps/admin-ui/src/sessions/SessionsSection.tsx @@ -18,11 +18,48 @@ import { useRealm } from "../context/realm-context/RealmContext"; import helpUrls from "../help-urls"; import { RevocationModal } from "./RevocationModal"; import SessionsTable from "./SessionsTable"; +import useToggle from "../utils/useToggle"; import "./SessionsSection.css"; type FilterType = "ALL" | "REGULAR" | "OFFLINE"; +type SessionFilterProps = { + filterType: FilterType; + onChange: (filterType: FilterType) => void; +}; + +const SessionFilter = ({ filterType, onChange }: SessionFilterProps) => { + const { t } = useTranslation("sessions"); + + const [open, toggle] = useToggle(); + + return ( + + ); +}; + export default function SessionsSection() { const { t } = useTranslation("sessions"); @@ -32,7 +69,6 @@ export default function SessionsSection() { const { realm } = useRealm(); const [revocationModalOpen, setRevocationModalOpen] = useState(false); - const [filterDropdownOpen, setFilterDropdownOpen] = useState(false); const [filterType, setFilterType] = useState("ALL"); const [noSessions, setNoSessions] = useState(false); @@ -111,28 +147,13 @@ export default function SessionsSection() { loader={loader} isSearching={filterType !== "ALL"} filter={ - + /> } />