fix: core notification is now not visible under updates

This commit is contained in:
sundasnoreen12
2024-05-13 16:03:13 +05:00
parent bdb851eb8b
commit 746b0fed4b
3 changed files with 6 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
}, [appId]);
const renderPreference = (preference) => (
(preference.coreNotificationTypes.length > 0 || preference.id !== 'core') && (
<div
key={`${preference.id}-${channel}`}
id={`${preference.id}-${channel}`}
@@ -80,6 +81,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
/>
)}
</div>
)
);
return (

View File

@@ -21,6 +21,7 @@ const NotificationTypes = ({ appId }) => {
<div className="d-flex flex-column mr-auto px-0">
{!mobileView && <span className="mb-3 header-label">{intl.formatMessage(messages.typeLabel)}</span>}
{preferences.map(preference => (
(preference.coreNotificationTypes.length > 0 || preference.id !== 'core') && (
<>
<div
key={preference.id}
@@ -53,6 +54,8 @@ const NotificationTypes = ({ appId }) => {
</div>
)}
</>
)
))}
</div>
);

View File

@@ -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;