"use client" import { useState, useEffect, useCallback } from "react" import { Avatar, AvatarFallback, AvatarImage } 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 { Skeleton } from "@/components/ui/skeleton" import { BarChart3, Eye, Calendar, Plus, ArrowRight, RefreshCw, LogIn } from "lucide-react" import Link from "next/link" import { useSession } from "@/lib/auth-client" interface Comparison { id: string title: string slug: string items: string[] tags: string[] viewCount: number overallScore: number createdAt: string } interface UserComparisonsResponse { comparisons: Comparison[] total: number page: number } interface UserStats { totalComparisons: number totalViews: number } export default function ProfilePage() { // TODO: Replace with real auth session data const user = { name: "Demo User", email: "demo@example.com", avatar: "" } const stats = [ { label: "Comparisons", value: "0", icon: BarChart3 }, { label: "Total Views", value: "0", icon: Eye }, ] const comparisons: Comparison[] = [] return (
{user.name.split(" ").map((n) => n[0]).join("")}

{user.name}

{user.email}

{stats.map((stat) => (

{stat.value}

{stat.label}

))}

My Comparisons

{comparisons.length > 0 ? (
{comparisons.map((comparison) => ( {comparison.title} {comparison.createdAt}
{comparison.tags.map((tag) => ( {tag} ))}
{comparison.items.join(" vs ")}
{comparison.viewCount.toLocaleString()} {comparison.overallScore}/10
))}
) : (

No comparisons yet

Create your first comparison to get started

)}
) }