Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed May 22, 2024
1 parent e9a5942 commit bf65daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/admin-ui/components/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ interface PaginationProps {
}

export function usePaginationParams({ defaultPageSize }: { defaultPageSize: number }) {
const { query } = useRouter();
const { query } = useRouter()
const currentPage = Math.max(
typeof query.page === 'string' && !Number.isNaN(parseInt(query.page)) ? Number(query.page) : 1,
1
)
const pageSize = typeof query.pageSize === 'string' && !Number.isNaN(parseInt(query.pageSize))
? parseInt(query.pageSize)
: defaultPageSize;
: defaultPageSize
return { currentPage, pageSize }
}

Expand Down

0 comments on commit bf65daf

Please sign in to comment.