multiple: set pagination defaults

Set pagination defaults, otherwise these might be `undefined`.
This commit is contained in:
Gianluca Zuccarelli 2024-11-29 13:50:08 +00:00 committed by Lucas Garfield
parent bad77421ae
commit 4125a9cd3b
8 changed files with 36 additions and 15 deletions

View file

@ -30,7 +30,7 @@ import {
import RepositoriesStatus from './RepositoriesStatus';
import RepositoryUnavailable from './RepositoryUnavailable';
import { ContentOrigin } from '../../../../constants';
import { ContentOrigin, PAGINATION_COUNT } from '../../../../constants';
import {
ApiRepositoryResponseRead,
useListRepositoriesQuery,
@ -580,7 +580,7 @@ const Repositories = () => {
</PanelMain>
</Panel>
<Pagination
itemCount={count}
itemCount={count ?? PAGINATION_COUNT}
perPage={perPage}
page={page}
onSetPage={(_, newPage) => setPage(newPage)}