Skip to content

Commit 7ddc27f

Browse files
authored
fix max page size incorrectly calculated (#409)
* fix max page size incorrectly calculated * add pagination key to survive rerenders
1 parent e4c93b8 commit 7ddc27f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/web/app/dashboard/(unified)/(mail)/mail/[identityPublicId]/[mailboxSlug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ async function Page({
4848
/>
4949

5050
<MailPagination
51+
key={page}
5152
count={count}
5253
mailboxSlug={activeMailbox.slug}
5354
identityPublicId={identityPublicId}

apps/web/components/mailbox/default/mail-pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function MailPagination({
3838
<Pagination
3939
value={activePage}
4040
onChange={updatePageNumber}
41-
total={count > 0 ? count / 50 : 0}
41+
total={count > 0 ? Math.ceil(count / 50) : 0}
4242
/>
4343
</div>
4444
);

0 commit comments

Comments
 (0)