feat: binded show notification tray status with the backend api

This commit is contained in:
SundasNoreen
2023-06-19 18:00:06 +05:00
parent 911cea6a0e
commit 4c4db14eac
6 changed files with 11 additions and 11 deletions

View File

@@ -27,11 +27,11 @@ import {
} from './api';
import { getHttpErrorStatus } from '../utils';
const normalizeNotificationCounts = ({ countByAppName, count, showNotificationTray }) => {
const normalizeNotificationCounts = ({ countByAppName, count, showNotificationsTray }) => {
const appIds = Object.keys(countByAppName);
const apps = appIds.reduce((acc, appId) => { acc[appId] = []; return acc; }, {});
return {
countByAppName, appIds, apps, count, showNotificationTray,
countByAppName, appIds, apps, count, showNotificationsTray,
};
};
@@ -70,7 +70,7 @@ export const fetchAppsNotificationCount = () => (
...normalisedData,
countByAppName: data.countByAppName,
count: data.count,
showNotificationTray: data.showNotificationTray,
showNotificationsTray: data.showNotificationsTray,
}));
} catch (error) {
if (getHttpErrorStatus(error) === 403) {