From 45eb5a3e63f59c5ca5609b6054e6d7bade224af9 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Wed, 8 Jun 2022 11:24:07 -0600 Subject: [PATCH] Always show notif settings details (#460) --- web/pages/notifications.tsx | 94 +++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 51 deletions(-) diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index dc258a38..52d5d1d6 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -276,9 +276,6 @@ function NotificationSettings() { const [emailNotificationSettings, setEmailNotificationSettings] = useState('all') const [privateUser, setPrivateUser] = useState(null) - const [showSettings, setShowSettings] = useState<'in-app' | 'email' | 'none'>( - 'none' - ) useEffect(() => { if (user) listenForPrivateUser(user.id, setPrivateUser) @@ -310,7 +307,6 @@ function NotificationSettings() { const success = 'Notification Settings Changed!' function changeEmailNotifications(newValue: notification_subscribe_types) { if (!privateUser) return - setShowSettings('email') if (newValue === 'all') { toast.promise( updatePrivateUser(privateUser.id, { @@ -367,7 +363,6 @@ function NotificationSettings() { error: (err) => `${err.message}`, } ) - setShowSettings('in-app') } useEffect(() => { @@ -407,6 +402,29 @@ function NotificationSettings() { className={'col-span-4 p-2'} toggleClassName={'w-24'} /> +
+
+
+ You will receive notifications for: + + + + +
+
+
Email Notifications
-
- {showSettings === 'in-app' ? ( -
-
- You will receive notifications for: - - - - -
-
- ) : showSettings === 'email' ? ( -
- You will receive emails for: - - - - -
- ) : ( -
- )} +
+
+ You will receive emails for: + + + + +
)