"use client"; import { useSession } from "@/lib/auth-client"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { Mail, Calendar, User, Shield, ArrowLeft } from "lucide-react"; import { useRouter } from "next/navigation"; export default function ProfilePage() { const { data: session, isPending } = useSession(); const router = useRouter(); if (isPending) { return (
Loading...
); } if (!session) { router.push("/"); return null; } const user = session.user; const createdDate = user.createdAt ? new Date(user.createdAt).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) : null; return (

Your Profile

{/* Profile Overview Card */}
{( user.name?.[0] || user.email?.[0] || "U" ).toUpperCase()}

{user.name}

{user.email} {user.emailVerified && ( Verified )}
{createdDate && (
Member since {createdDate}
)}
{/* Account Information */} Account Information Your account details and settings
{user.name || "Not provided"}
{user.email} {user.emailVerified && ( Verified )}

Account Status

Email Verification

Email address verification status

{user.emailVerified ? "Verified" : "Unverified"}

Account Type

Your account access level

Standard
{/* Account Activity */} Recent Activity Your recent account activity and sessions

Current Session

Active now

Active
{/* Quick Actions */} Quick Actions Manage your account settings and preferences

Additional profile management features coming soon.

); }