From fe392dd40f3eb185d8f45a5f469c2c7cc24309e4 Mon Sep 17 00:00:00 2001 From: Developing-Gamer Date: Wed, 27 May 2026 12:47:51 -0700 Subject: [PATCH] Add notifications page for dashboard account settings. Co-authored-by: Cursor --- .../notifications/notifications-page.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 apps/dashboard/src/components/dashboard-account-settings/notifications/notifications-page.tsx diff --git a/apps/dashboard/src/components/dashboard-account-settings/notifications/notifications-page.tsx b/apps/dashboard/src/components/dashboard-account-settings/notifications/notifications-page.tsx new file mode 100644 index 000000000..37d95e50e --- /dev/null +++ b/apps/dashboard/src/components/dashboard-account-settings/notifications/notifications-page.tsx @@ -0,0 +1,45 @@ +'use client'; + +import { useUser } from "@stackframe/stack"; +import { PageLayout } from "../page-layout"; +import { Switch } from "@/components/ui/switch"; + +export function NotificationsPage() { + const user = useUser({ or: 'redirect' }); + const notificationCategories = user.useNotificationCategories(); + + return ( + +
+
+

+ Email Notifications +

+

+ Choose which emails you want to receive. +

+
+ +
+ {notificationCategories.map((category) => ( +
+
+ {category.name} + {!category.canDisable && ( + + (Required for transactional updates and cannot be disabled) + + )} +
+ void category.setEnabled(value)} + disabled={!category.canDisable} + /> +
+ ))} +
+
+
+ ); +}