import { redirect } from 'next/navigation' import { auth } from '@/auth' import { getUserProfile } from '@/lib/auth-actions' import ProfileForm from '@/components/ProfileForm' import PasswordChangeForm from '@/components/PasswordChangeForm' 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 auth() if (!session?.user?.id) { redirect('/auth/login') } const userProfile = await getUserProfile(session.user.id) if (!userProfile) { redirect('/auth/login') } return (
{/* Header */}
Back to Lists

Profile Settings

Manage your account information and security settings

{/* Profile Information Section */}

Profile Information

Update your name and email address

{/* Password Section */}

Change Password

Update your password to keep your account secure

{/* Account Information */}

Account Information

Account ID {userProfile.id}
Member Since {new Date(userProfile.createdAt).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', })}
Last Updated {new Date(userProfile.updatedAt).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', })}
) }