From af80d795ad2e7871723913f22e08d220bbac2d9b Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Thu, 8 Mar 2018 15:17:36 +0100 Subject: [PATCH] Only show digest options when having choice --- .../client/components/Settings.js | 62 ++++++++++--------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/plugins/talk-plugin-notifications/client/components/Settings.js b/plugins/talk-plugin-notifications/client/components/Settings.js index 329f4d1c1..a5c3b4fcd 100644 --- a/plugins/talk-plugin-notifications/client/components/Settings.js +++ b/plugins/talk-plugin-notifications/client/components/Settings.js @@ -37,8 +37,15 @@ class Settings extends React.Component { onChangeDigestFrequency, } = this.props; + const slotProps = { + queryData: { root }, + setTurnOffInputFragment: setTurnOffInputFragment, + updateNotificationSettings: updateNotificationSettings, + disabled: needEmailVerification, + }; + return ( - +

{t('talk-plugin-notifications.settings_title')}

@@ -55,36 +62,35 @@ class Settings extends React.Component {
-
-

- {t('talk-plugin-notifications.digest_option')} -

- - {digestFrequencyValues.map(v => ( - -
+ {digestFrequencyValues.length > 1 && ( +
+

+ {t('talk-plugin-notifications.digest_option')} +

+ + {digestFrequencyValues.map(v => ( + +
+ )}