diff --git a/client/src/oppgavebenk/Oppgavebenk.tsx b/client/src/oppgavebenk/Oppgavebenk.tsx index c6d15238..ad6b34d0 100644 --- a/client/src/oppgavebenk/Oppgavebenk.tsx +++ b/client/src/oppgavebenk/Oppgavebenk.tsx @@ -33,7 +33,10 @@ export function Oppgavebenk() { const [sort, setSort] = useLocalStorageState('oppgavebenkSortState', initialSortState) - const { oppgaver, isLoading, error, totalElements } = useOppgavelisteV2(1, sort, { tildeltFilter, gjelderFilter }) + const { oppgaver, isLoading, error, totalElements } = useOppgavelisteV2(currentPage, sort, { + tildeltFilter, + gjelderFilter, + }) const handleFilter = (handler: (...args: any[]) => any, value: OppgaveGjelderFilter | string) => { handler(value) diff --git a/client/src/oppgavebenk/useOppgavelisteV2.ts b/client/src/oppgavebenk/useOppgavelisteV2.ts index f0e51c64..1bd403d8 100644 --- a/client/src/oppgavebenk/useOppgavelisteV2.ts +++ b/client/src/oppgavebenk/useOppgavelisteV2.ts @@ -38,7 +38,7 @@ interface Filters { const pathConfig = (currentPage: number, sort: SortState, filters: Filters): PathConfigType => { const sortDirection = sort.direction === 'ascending' ? 'ASC' : 'DESC' - const pagingParams = { limit: PAGE_SIZE, offset: currentPage - 1 } + const pagingParams = { limit: PAGE_SIZE, page: currentPage } const sortParams = { sorteringsfelt: sort.orderBy, sorteringsrekkefølge: sortDirection } const { tildeltFilter, gjelderFilter } = filters