Skip to content

Commit

Permalink
fixed pagination
Browse files Browse the repository at this point in the history
fixes: keycloak#36196
Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit committed Jan 7, 2025
1 parent 0535c76 commit 0a1fb5a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions js/apps/admin-ui/src/clients/ClientSessions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export const ClientSessions = ({ client }: ClientSessionsProps) => {

const { t } = useTranslation();

const loader: LoaderFunction<UserSessionRepresentation> = async (
first,
max,
) => {
const loader: LoaderFunction<UserSessionRepresentation> = async () => {
const mapSessionsToType =
(type: string) => (sessions: UserSessionRepresentation[]) =>
sessions.map((session) => ({
Expand All @@ -28,13 +25,11 @@ export const ClientSessions = ({ client }: ClientSessionsProps) => {

const allSessions = await Promise.all([
adminClient.clients
.listSessions({ id: client.id!, first, max })
.listSessions({ id: client.id! })
.then(mapSessionsToType(t("sessionsType.regularSSO"))),
adminClient.clients
.listOfflineSessions({
id: client.id!,
first,
max,
})
.then(mapSessionsToType(t("sessionsType.offline"))),
]);
Expand Down

0 comments on commit 0a1fb5a

Please sign in to comment.