From fe8f6d1002aaa22d6f4a2c8bf40d07586f1bdbb5 Mon Sep 17 00:00:00 2001 From: zain94rif Date: Wed, 7 Jan 2026 14:40:36 +0700 Subject: [PATCH] fix: move update is read's api after fetchLogHistory --- src/pages/notificationDetail/IndexNotificationDetail.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/notificationDetail/IndexNotificationDetail.jsx b/src/pages/notificationDetail/IndexNotificationDetail.jsx index 73991a5..cdcf0fe 100644 --- a/src/pages/notificationDetail/IndexNotificationDetail.jsx +++ b/src/pages/notificationDetail/IndexNotificationDetail.jsx @@ -235,8 +235,6 @@ const NotificationDetailTab = (props) => { // Fetch using the actual API const response = await getNotificationDetail(notificationId); - // Fetch using the actual API - const resUpdate = await updateIsRead(notificationId); if (response && response.data) { const transformedData = transformNotificationData(response.data); @@ -244,6 +242,9 @@ const NotificationDetailTab = (props) => { // Fetch log history fetchLogHistory(notificationId); + + // Fetch using the actual API + const resUpdate = await updateIsRead(notificationId); } else { throw new Error('Notification not found'); }