Skip to content

Commit

Permalink
🐛 Fix fetchNextPage
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed Apr 25, 2022
1 parent 7b6df06 commit 5e6ceb0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function useNotifications() {

async function fetchNextPage() {
if (!hasNextPage) return;
setPage(page + 1);

await fetchPage(page);
const nextPage = page + 1;
await setPage(nextPage);
await fetchPage(nextPage);
}

async function markAsSeen(messageId: string) {
Expand Down

0 comments on commit 5e6ceb0

Please sign in to comment.