Skip to content

Commit

Permalink
fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
misssn1998 committed Sep 4, 2024
1 parent be04a4a commit 2c48487
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions web/src/app/components/AlumniBoard/AlumniListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,25 @@ const AlumniListing: FC<AlumniListingProp> = ({}) => {
))}
</Grid>
<Flex align="flex-end" justify="center">
<Pagination
total={Math.ceil(alumniList.length / alumniPerPage)} // automatically show elipse when pages > 8
value={activePage}
onChange={setActivePage}
size="lg"
mb="md"
/>
{!isPortrait ? (
<Pagination
total={Math.ceil(alumniList.length / alumniPerPage)}
value={activePage}
onChange={setActivePage}
size="lg"
mb="md"
/>
) : (
<Pagination
total={Math.ceil(alumniList.length / alumniPerPage)}
boundaries={1}
siblings={0}
value={activePage}
onChange={setActivePage}
size="lg"
mb="md"
/>
)}
</Flex>
</>
);
Expand Down

0 comments on commit 2c48487

Please sign in to comment.