Перейти к основному содержимому

useMarkNotificationsRead

@mineflow/client-react


@mineflow/client-react / notifications / useMarkNotificationsRead

Function: useMarkNotificationsRead()

function useMarkNotificationsRead(): UseMutationResult<{
marked: number;
}, Error, {
notificationIds: string[];
}>;

Defined in: client-react/src/notifications.ts:90

Отметить уведомления прочитанными (BL-08). Идемпотентно (повторная отметка — no-op); адресность проверяет бэк. На успехе инвалидирует раздел уведомлений (лента + счётчик непрочитанных).

Returns​

UseMutationResult<{ marked: number; }, Error, { notificationIds: string[]; }>

Example​

const markRead = useMarkNotificationsRead();
markRead.mutate({ notificationIds: [id] });