diff --git a/src/app/(app)/profile/page.tsx b/src/app/(app)/profile/page.tsx index e1c44c2..b92e41c 100644 --- a/src/app/(app)/profile/page.tsx +++ b/src/app/(app)/profile/page.tsx @@ -1,7 +1,14 @@ 'use client' import { useEffect, useState } from 'react' -import { getSessionUser, updateProfile, changePassword, getSettings, getUserNotificationConfig, updateUserNotificationConfig } from '@/app/actions' +import { + getSessionUser, + updateProfile, + changePassword, + getSettings, + getUserNotificationConfig, + updateUserNotificationConfig, +} from '@/app/actions' import { Card, CardContent, CardHeader, CardTitle, CardFooter } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' @@ -65,7 +72,7 @@ export default function ProfilePage() { const [globalSettings, notifConfig] = await Promise.all([ getSettings(), - getUserNotificationConfig(sessionUser.id) + getUserNotificationConfig(sessionUser.id), ]) if (globalSettings?.MATTERMOST_NOTIF_ENABLED === 'true') { @@ -93,10 +100,12 @@ export default function ProfilePage() { const [res, notifRes] = await Promise.all([ updateProfile(user.id, name.trim(), photo.trim() || null), - globalNotifEnabled ? updateUserNotificationConfig(user.id, { - mattermost_channel_id: mmChannelId, - is_active: mmActive - }) : Promise.resolve({ success: true, error: null }) + globalNotifEnabled + ? updateUserNotificationConfig(user.id, { + mattermost_channel_id: mmChannelId, + is_active: mmActive, + }) + : Promise.resolve({ success: true, error: null }), ]) if (res.success && notifRes.success) { @@ -244,7 +253,7 @@ export default function ProfilePage() { {globalNotifEnabled && ( -
+
@@ -259,7 +268,7 @@ export default function ProfilePage() {
-
+
-
@@ -321,7 +333,6 @@ export default function ProfilePage() {
-
{/* Right 1 Col: Account Details */}