refactor: fixed data updation in redux

This commit is contained in:
ayeshoali
2023-06-20 13:31:15 +05:00
parent 4c4db14eac
commit 2d737aae7f

View File

@@ -66,12 +66,7 @@ export const fetchAppsNotificationCount = () => (
dispatch(fetchNotificationsCountRequest());
const data = await getNotificationCounts();
const normalisedData = normalizeNotificationCounts((camelCaseObject(data)));
dispatch(fetchNotificationsCountSuccess({
...normalisedData,
countByAppName: data.countByAppName,
count: data.count,
showNotificationsTray: data.showNotificationsTray,
}));
dispatch(fetchNotificationsCountSuccess({ ...normalisedData }));
} catch (error) {
if (getHttpErrorStatus(error) === 403) {
dispatch(fetchNotificationsCountDenied());