diff --git a/src/components/settings/NotificationsTab.tsx b/src/components/settings/NotificationsTab.tsx index 0256fb62..fee05aa2 100644 --- a/src/components/settings/NotificationsTab.tsx +++ b/src/components/settings/NotificationsTab.tsx @@ -15,7 +15,6 @@ interface ChannelPreferences { in_app: boolean; email: boolean; push: boolean; - sms: boolean; } interface WorkflowPreferences { @@ -45,7 +44,6 @@ export function NotificationsTab() { in_app: true, email: true, push: false, - sms: false, }); const [workflowPreferences, setWorkflowPreferences] = useState({}); const [frequencySettings, setFrequencySettings] = useState({ @@ -67,7 +65,8 @@ export function NotificationsTab() { const preferences = await notificationService.getPreferences(user.id); if (preferences) { - setChannelPreferences(preferences.channelPreferences); + const { sms, ...channelPrefs } = preferences.channelPreferences; + setChannelPreferences(channelPrefs); setWorkflowPreferences(preferences.workflowPreferences); setFrequencySettings(preferences.frequencySettings); } @@ -105,7 +104,10 @@ export function NotificationsTab() { setLoading(true); try { const result = await notificationService.updatePreferences(user.id, { - channelPreferences, + channelPreferences: { + ...channelPreferences, + sms: false, // SMS not supported in UI + }, workflowPreferences, frequencySettings, }); @@ -246,27 +248,6 @@ export function NotificationsTab() { /> - {isNovuEnabled && ( - <> - -
-
- -

- Receive notifications via text message -

-
- updateChannelPreference('sms', checked)} - disabled - /> -
- - )}