We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5c4826 commit b0aa91bCopy full SHA for b0aa91b
site/src/components/PaginationWidget/PaginationWidgetBase.tsx
@@ -21,14 +21,15 @@ export const PaginationWidgetBase = ({
21
}: PaginationWidgetBaseProps): JSX.Element | null => {
22
const theme = useTheme();
23
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
24
- const numPages = Math.ceil(count / limit);
25
- const isFirstPage = page === 0;
26
- const isLastPage = page === numPages - 1;
27
+ const numPages = Math.ceil(count / limit);
28
if (numPages < 2) {
29
return null;
30
}
31
+ const isFirstPage = page <= 1;
+ const isLastPage = page >= numPages;
32
+
33
return (
34
<div
35
css={{
0 commit comments