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'); }