Pagination is set on the 'action' bar

Signed-off-by: GregoireW <24318548+GregoireW@users.noreply.github.com>
This commit is contained in:
GregoireW
2021-05-10 14:01:48 +02:00
parent 816a741331
commit 55480c3176
@@ -154,11 +154,22 @@ export const MembersListCard = (_props: {
const nbPages = Math.ceil((members?.length || 0) / pageSize);
const paginationLabel = nbPages < 2 ? '' : `, page ${page} of ${nbPages}`;
const pagination = (
<Pagination
count={nbPages}
page={page}
onChange={pageChange}
showFirstButton
showLastButton
/>
);
return (
<Grid item>
<InfoCard
title={`Members (${members?.length || 0}${paginationLabel})`}
subheader={`of ${displayName}`}
actions={pagination}
>
<Grid container spacing={3}>
{members && members.length > 0 ? (
@@ -173,13 +184,6 @@ export const MembersListCard = (_props: {
</Box>
)}
</Grid>
<Pagination
count={nbPages}
page={page}
onChange={pageChange}
showFirstButton
showLastButton
/>
</InfoCard>
</Grid>
);