Skip to content

Commit

Permalink
feat: hide pagination if single page
Browse files Browse the repository at this point in the history
  • Loading branch information
flagrede committed Nov 20, 2024
1 parent 78cd078 commit c979e53
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,21 +386,23 @@ export const AllProjects: React.FC<React.PropsWithChildren<unknown>> = () => {
</>
</EmptyState>
)}
<Flex
sx={{
gridColumn: '1/-1',
mt: pxToRem(28),
justifyContent: { xs: 'center', tablet: 'end' },
}}
>
<Pagination
count={pagesCount}
page={Number(routePage)}
onChange={(event, value) => navigate(`/projects/${value}`)}
size={isMobile ? 'small' : 'large'}
colorScheme={COLOR_SCHEME}
/>
</Flex>
{pagesCount > 1 && (
<Flex
sx={{
gridColumn: '1/-1',
mt: pxToRem(28),
justifyContent: { xs: 'center', tablet: 'end' },
}}
>
<Pagination
count={pagesCount}
page={Number(routePage)}
onChange={(event, value) => navigate(`/projects/${value}`)}
size={isMobile ? 'small' : 'large'}
colorScheme={COLOR_SCHEME}
/>
</Flex>
)}
</>
);
};

0 comments on commit c979e53

Please sign in to comment.