Skip to content

Commit

Permalink
refactor: removed lowercase function
Browse files Browse the repository at this point in the history
  • Loading branch information
sundasnoreen12 committed May 15, 2024
1 parent c787a77 commit b2173af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/notification-preferences/NotificationPreferenceColumn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
const nonEditable = useSelector(selectNonEditablePreferences(appId));
const updatePreferencesStatus = useSelector(selectUpdatePreferencesStatus());
const mobileView = useIsOnMobile();
const NOTIFICATION_CHANNELS = Object.keys(notificationChannels());
const NOTIFICATION_CHANNELS = Object.values(notificationChannels());

const onChannelToggle = useCallback((event) => {
const { id: notificationChannel } = event.target;
Expand Down Expand Up @@ -61,7 +61,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
className={classNames(
'd-flex align-items-center justify-content-center mb-2 h-4.5 column-padding',
{
'pr-0': channel === NOTIFICATION_CHANNELS[NOTIFICATION_CHANNELS.length - 1].toLowerCase(),
'pr-0': channel === NOTIFICATION_CHANNELS[NOTIFICATION_CHANNELS.length - 1],
'pl-0': channel === 'web' && mobileView,
},
)}
Expand Down Expand Up @@ -94,7 +94,7 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
role="button"
onClick={onChannelToggle}
className={classNames('mb-3 header-label column-padding', {
'pr-0': channel === NOTIFICATION_CHANNELS[NOTIFICATION_CHANNELS.length - 1].toLowerCase(),
'pr-0': channel === NOTIFICATION_CHANNELS[NOTIFICATION_CHANNELS.length - 1],
'pl-0': channel === 'web' && mobileView,
})}
>
Expand Down

0 comments on commit b2173af

Please sign in to comment.