fix: move update is read's api after fetchLogHistory

This commit is contained in:
zain94rif
2026-01-07 14:40:36 +07:00
parent 5281e288a9
commit fe8f6d1002

View File

@@ -235,8 +235,6 @@ const NotificationDetailTab = (props) => {
// Fetch using the actual API // Fetch using the actual API
const response = await getNotificationDetail(notificationId); const response = await getNotificationDetail(notificationId);
// Fetch using the actual API
const resUpdate = await updateIsRead(notificationId);
if (response && response.data) { if (response && response.data) {
const transformedData = transformNotificationData(response.data); const transformedData = transformNotificationData(response.data);
@@ -244,6 +242,9 @@ const NotificationDetailTab = (props) => {
// Fetch log history // Fetch log history
fetchLogHistory(notificationId); fetchLogHistory(notificationId);
// Fetch using the actual API
const resUpdate = await updateIsRead(notificationId);
} else { } else {
throw new Error('Notification not found'); throw new Error('Notification not found');
} }