From a83f3727b15892eb0a60c087f00e028a2a1f9084 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Fri, 13 Feb 2026 15:14:14 +0100 Subject: [PATCH] refactor: enhance notification settings layout in OrganizationSettings for better usability and visual clarity --- components/settings/OrganizationSettings.tsx | 67 ++++++++++---------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/components/settings/OrganizationSettings.tsx b/components/settings/OrganizationSettings.tsx index c44fb31..8494171 100644 --- a/components/settings/OrganizationSettings.tsx +++ b/components/settings/OrganizationSettings.tsx @@ -975,7 +975,7 @@ export default function OrganizationSettings() {

Notification Settings

-

+

Choose which notification types you want to receive. These apply to the notification center for owners and admins.

@@ -985,41 +985,44 @@ export default function OrganizationSettings() {
) : ( -
- {notificationCategories.map((cat) => ( -
-
-

{cat.label}

-

{cat.description}

-
-
- { - const next = { ...notificationSettings, [cat.id]: checked === true } - setNotificationSettings(next) - setIsSavingNotificationSettings(true) - updateNotificationSettings(next) - .then(() => { - toast.success('Notification settings updated') - }) - .catch((err) => { - toast.error(getAuthErrorMessage(err) || 'Failed to update settings') - setNotificationSettings(notificationSettings) - }) - .finally(() => setIsSavingNotificationSettings(false)) +
+

Notification categories

+
+ {notificationCategories.map((cat) => ( +
+
+

{cat.label}

+

{cat.description}

+
+
+ { + const next = { ...notificationSettings, [cat.id]: checked === true } + setNotificationSettings(next) + setIsSavingNotificationSettings(true) + updateNotificationSettings(next) + .then(() => { + toast.success('Notification settings updated') + }) + .catch((err) => { + toast.error(getAuthErrorMessage(err) || 'Failed to update settings') + setNotificationSettings(notificationSettings) + }) + .finally(() => setIsSavingNotificationSettings(false)) }} disabled={isSavingNotificationSettings} /> - - {notificationSettings[cat.id] !== false ? 'On' : 'Off'} - + + {notificationSettings[cat.id] !== false ? 'On' : 'Off'} + +
-
- ))} + ))} +
)}