From 746b0fed4b86b854de16eb3f62cf62d01ca3044f Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Mon, 13 May 2024 16:03:13 +0500 Subject: [PATCH] fix: core notification is now not visible under updates --- src/notification-preferences/NotificationPreferenceColumn.jsx | 2 ++ src/notification-preferences/NotificationTypes.jsx | 3 +++ src/notification-preferences/data/thunks.js | 1 + 3 files changed, 6 insertions(+) diff --git a/src/notification-preferences/NotificationPreferenceColumn.jsx b/src/notification-preferences/NotificationPreferenceColumn.jsx index 5178fce..2fc0374 100644 --- a/src/notification-preferences/NotificationPreferenceColumn.jsx +++ b/src/notification-preferences/NotificationPreferenceColumn.jsx @@ -52,6 +52,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => { }, [appId]); const renderPreference = (preference) => ( + (preference.coreNotificationTypes.length > 0 || preference.id !== 'core') && (
{ /> )}
+ ) ); return ( diff --git a/src/notification-preferences/NotificationTypes.jsx b/src/notification-preferences/NotificationTypes.jsx index c192e6f..64dd7d9 100644 --- a/src/notification-preferences/NotificationTypes.jsx +++ b/src/notification-preferences/NotificationTypes.jsx @@ -21,6 +21,7 @@ const NotificationTypes = ({ appId }) => {
{!mobileView && {intl.formatMessage(messages.typeLabel)}} {preferences.map(preference => ( + (preference.coreNotificationTypes.length > 0 || preference.id !== 'core') && ( <>
{
)} + ) + ))}
); diff --git a/src/notification-preferences/data/thunks.js b/src/notification-preferences/data/thunks.js index 2e77093..6f9b110 100644 --- a/src/notification-preferences/data/thunks.js +++ b/src/notification-preferences/data/thunks.js @@ -60,6 +60,7 @@ const normalizePreferences = (responseData) => { email: preferences[appId].notificationTypes[preferenceId].email, info: preferences[appId].notificationTypes[preferenceId].info || '', emailCadence: preferences[appId].notificationTypes[preferenceId].emailCadence || EMAIL_CADENCE.DAILY, + coreNotificationTypes: preferences[appId].coreNotificationTypes || [], } )); nonEditable[appId] = preferences[appId].nonEditable;