Files
Momento/memento-note/app/(main)/settings/general/page.tsx
Antigravity 360e58e473
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 5m58s
CI / Deploy production (on server) (push) Successful in 26s
feat(admin): consentement aux annonces et désabonnement sans connexion
Les comptes déjà créés ne sont pas inscrits. Le choix est facultatif à l’inscription et dans les paramètres. Un lien public demande confirmation avant d’arrêter les actualités, sans toucher aux messages de compte.
2026-09-06 09:23:10 +00:00

31 lines
878 B
TypeScript

import { auth } from '@/auth'
import { redirect } from 'next/navigation'
import { getAISettings } from '@/app/actions/ai-settings'
import { getMyMarketingPreference } from '@/app/actions/marketing-preference'
import { GeneralSettingsClient } from './general-settings-client'
export default async function GeneralSettingsPage() {
const session = await auth()
if (!session?.user) {
redirect('/api/auth/signin')
}
const {
preferredLanguage,
emailNotifications,
desktopNotifications,
autoSave,
} = await getAISettings()
const marketing = await getMyMarketingPreference()
return (
<GeneralSettingsClient
initialSettings={{ preferredLanguage, emailNotifications, desktopNotifications, autoSave }}
initialMarketing={{
optedIn: marketing?.optedIn === true,
blocked: marketing?.blocked === true,
}}
/>
)
}