diff --git a/web/modals/threads/notifications/enum-settings-option.react.js b/web/modals/threads/notifications/enum-settings-option.react.js --- a/web/modals/threads/notifications/enum-settings-option.react.js +++ b/web/modals/threads/notifications/enum-settings-option.react.js @@ -12,20 +12,23 @@ +onSelect: () => void, +icon: React.Node, +title: string, - +description: $ReadOnlyArray<[string, boolean]>, + +statements: $ReadOnlyArray<{ + +statement: string, + +isStatementValid: boolean, + }>, }; function EnumSettingsOption(props: Props): React.Node { - const { icon, title, description, selected, onSelect } = props; + const { icon, title, statements, selected, onSelect } = props; const descriptionItems = React.useMemo( () => - description.map(([text, isValid]) => ( - - {text} + statements.map(({ statement, isStatementValid }) => ( + + {statement} )), - [description], + [statements], ); const optionContainerClasses = React.useMemo( diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js --- a/web/modals/threads/notifications/notifications-modal.react.js +++ b/web/modals/threads/notifications/notifications-modal.react.js @@ -72,10 +72,10 @@ const isFocusedSelected = notificationSettings === 'focused'; const focusedItem = React.useMemo(() => { - const description = [ - ['Banner notifs', true], - ['Badge count', true], - ['Lives in Focused tab', true], + const statements = [ + { statement: 'Banner notifs', isStatementValid: true }, + { statement: 'Badge count', isStatementValid: true }, + { statement: 'Lives in Focused tab', isStatementValid: true }, ]; const icon = ( @@ -97,10 +97,10 @@ const isFocusedBadgeOnlySelected = notificationSettings === 'badge-only'; const focusedBadgeOnlyItem = React.useMemo(() => { - const description = [ - ['Banner notifs', false], - ['Badge count', true], - ['Lives in Focused tab', true], + const statements = [ + { statement: 'Banner notifs', isStatementValid: false }, + { statement: 'Badge count', isStatementValid: true }, + { statement: 'Lives in Focused tab', isStatementValid: true }, ]; const icon = ( @@ -122,10 +122,10 @@ const isBackgroundSelected = notificationSettings === 'background'; const backgroundItem = React.useMemo(() => { - const description = [ - ['Banner notifs', false], - ['Badge count', false], - ['Lives in Backgound tab', true], + const statements = [ + { statement: 'Banner notifs', isStatementValid: false }, + { statement: 'Badge count', isStatementValid: false }, + { statement: 'Lives in Background tab', isStatementValid: true }, ]; const icon = (