fix: update isReadFilter

This commit is contained in:
2025-12-01 10:51:11 +07:00
parent 61ca7249cd
commit 1c2ddca9d4

View File

@@ -202,7 +202,7 @@ const ListNotification = memo(function ListNotification(props) {
}));
// Fetch notifications with new pagination
const isReadFilter = activeTab === 'read' ? true : activeTab === 'unread' ? false : null;
const isReadFilter = activeTab === 'read' ? 1 : activeTab === 'unread' ? 0 : null;
fetchNotifications(page, pageSize, isReadFilter);
};
@@ -214,7 +214,7 @@ const ListNotification = memo(function ListNotification(props) {
}
// Fetch notifications on component mount and when tab changes
const isReadFilter = activeTab === 'read' ? true : activeTab === 'unread' ? false : null;
const isReadFilter = activeTab === 'read' ? 1 : activeTab === 'unread' ? 0 : null;
fetchNotifications(pagination.current_page, pagination.current_limit, isReadFilter);
}, [activeTab]);