fiexed bug that pagination was set to 0

main
alex 2023-09-10 19:47:42 +02:00
parent a6defbb68c
commit 98b73cea72
1 changed files with 4 additions and 1 deletions

View File

@ -933,7 +933,10 @@ export function handleWebSocketMessage(
obj.Notifications = newArr;
if (newArr.length === 0) {
if (
newArr.length === 0 &&
headerContext.paginationPageRef.current > 1
) {
const newPaginationPage = headerContext.paginationPageRef.current - 1;
headerContext.setPaginationPage(newPaginationPage);