fix: update isReadFilter
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user