diff --git a/src/notification-preferences/NotificationCourses.jsx b/src/notification-preferences/NotificationCourses.jsx index a81e42f7a..3ae51dd4d 100644 --- a/src/notification-preferences/NotificationCourses.jsx +++ b/src/notification-preferences/NotificationCourses.jsx @@ -13,7 +13,7 @@ import { LOADING_STATUS, SUCCESS_STATUS, } from '../constants'; -import { messages } from './messages'; +import messages from './messages'; import { NotFoundPage } from '../account-settings'; import { useFeedbackWrapper } from '../hooks'; diff --git a/src/notification-preferences/NotificationPreferenceApp.jsx b/src/notification-preferences/NotificationPreferenceApp.jsx index c41f29913..807cbfd15 100644 --- a/src/notification-preferences/NotificationPreferenceApp.jsx +++ b/src/notification-preferences/NotificationPreferenceApp.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Collapsible } from '@edx/paragon'; -import { messages } from './messages'; +import messages from './messages'; import ToggleSwitch from './ToggleSwitch'; import { selectPreferenceAppToggleValue, diff --git a/src/notification-preferences/NotificationPreferenceRow.jsx b/src/notification-preferences/NotificationPreferenceRow.jsx index 0e9b971fe..5f82df865 100644 --- a/src/notification-preferences/NotificationPreferenceRow.jsx +++ b/src/notification-preferences/NotificationPreferenceRow.jsx @@ -5,7 +5,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Icon, OverlayTrigger, Tooltip } from '@edx/paragon'; import { InfoOutline } from '@edx/paragon/icons'; -import { messages } from './messages'; +import messages from './messages'; import ToggleSwitch from './ToggleSwitch'; import { selectPreference, @@ -13,6 +13,7 @@ import { selectSelectedCourseId, selectNotificationPreferencesStatus, } from './data/selectors'; +import NOTIFICATION_CHANNELS from './data/constants'; import { updatePreferenceToggle } from './data/thunks'; import { LOADING_STATUS } from '../constants'; @@ -53,7 +54,7 @@ const NotificationPreferenceRow = ({ appId, preferenceName }) => { {preference.info} - )} + )} > @@ -62,7 +63,7 @@ const NotificationPreferenceRow = ({ appId, preferenceName }) => { )}
- {['web'].map((channel) => ( + {NOTIFICATION_CHANNELS.map((channel) => (
{ destination="https://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/sfd_notifications/managing_notifications.html" target="_blank" rel="noopener noreferrer" - className="text-decoration-underline" + className="text-decoration-underline ml-1" > {intl.formatMessage(messages.notificationPreferenceGuideLink)} @@ -83,15 +83,15 @@ const NotificationPreferences = () => {
{preferencesList} {isLoading && ( -
- -
+
+ +
)}
diff --git a/src/notification-preferences/data/constants.js b/src/notification-preferences/data/constants.js new file mode 100644 index 000000000..d3e2e5cf1 --- /dev/null +++ b/src/notification-preferences/data/constants.js @@ -0,0 +1,3 @@ +const NOTIFICATION_CHANNELS = ['web']; + +export default NOTIFICATION_CHANNELS; diff --git a/src/notification-preferences/messages.js b/src/notification-preferences/messages.js index 62b9f67d5..91780fbb6 100644 --- a/src/notification-preferences/messages.js +++ b/src/notification-preferences/messages.js @@ -1,7 +1,6 @@ import { defineMessages } from '@edx/frontend-platform/i18n'; -// eslint-disable-next-line import/prefer-default-export -export const messages = defineMessages({ +const messages = defineMessages({ notificationHeading: { id: 'notification.preference.heading', defaultMessage: 'Notifications', @@ -10,21 +9,21 @@ export const messages = defineMessages({ notificationAppTitle: { id: 'notification.preference.app.title', defaultMessage: `{ - key, select, - discussion {Discussions} - coursework {Course Work} - other {{key}} + key, select, + discussion {Discussions} + coursework {Course Work} + other {{key}} }`, description: 'Display text for Notification Types', }, notificationTitle: { id: 'notification.preference.title', defaultMessage: `{ - text, select, - core {Core notifications} - newDiscussionPost {New discussion posts} - newQuestionPost {New question posts} - other {{text}} + text, select, + core {Core notifications} + newDiscussionPost {New discussion posts} + newQuestionPost {New question posts} + other {{text}} }`, description: 'Display text for Notification Types', }, @@ -34,7 +33,7 @@ export const messages = defineMessages({ description: 'Display text for type', }, webLabel: { - id: 'notification.preference.web,label', + id: 'notification.preference.web.label', defaultMessage: 'Web', description: 'Display text for web', }, @@ -60,7 +59,9 @@ export const messages = defineMessages({ }, notificationPreferenceGuideBody: { id: 'notification.preference.guide.body', - defaultMessage: 'Notifications for certain activities are enabled by default, ', + defaultMessage: 'Notifications for certain activities are enabled by default,', description: 'Body of the notification preferences for learner guide', }, }); + +export default messages;