unable to select a readed notification

This commit is contained in:
smanylov
2026-04-10 16:31:22 +07:00
parent 90903a67ac
commit 02b378612b
2 changed files with 25 additions and 12 deletions
+5
View File
@@ -5250,6 +5250,11 @@
border: 2px solid v.$border-color-1-hover;
}
}
.empty-block {
width: 24px;
height: 24px;
}
}
}
@@ -79,7 +79,11 @@ export function NotificationsList() {
}
function selectAllHandler() {
setSelectedFiles(new Set(allNotifications?.notifications.map(item => item.id)));
const idsToSelect = allNotifications?.notifications
.filter(item => item.status !== 'READIED')
.map(item => item.id);
setSelectedFiles(new Set(idsToSelect));
}
async function notificationActionHandler(ids: number[], action: 'remove' | 'mark-as-read') {
@@ -179,6 +183,7 @@ export function NotificationsList() {
<div
className="notification-check"
>
{item.status !== 'READIED' ? (
<button
onClick={() => {
selectHandler(item.id);
@@ -188,6 +193,9 @@ export function NotificationsList() {
<IconCheck />
)}
</button>
) : (
<div className="empty-block"></div>
)}
</div>
<div