import { redirect } from 'next/navigation' import { getServerSession } from 'next-auth' import { authOptions } from '@/pages/api/auth/[...nextauth]' import { getUserProfile } from '@/lib/auth-actions' import ProfileForm from '@/components/ProfileForm' import PasswordChangeForm from '@/components/PasswordChangeForm' import NotificationSettings from '@/components/NotificationSettings' import Link from 'next/link' export const metadata = { title: 'Profile - Ultimate Lists', description: 'Manage your profile and account settings', } export default async function ProfilePage() { const session = await getServerSession(authOptions) if (!session?.user?.id) { redirect('/auth/login') } const userProfile = await getUserProfile(session.user.id) if (!userProfile) { redirect('/auth/login') } return (
Manage your account information and security settings
Update your name and email address
Update your password to keep your account secure