fix: move update is read's api after fetchLogHistory
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user