fix: replace mockUser/mockComparisons with proper local variables in profile page
This commit is contained in:
@@ -33,18 +33,26 @@ interface UserStats {
|
||||
}
|
||||
|
||||
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 (
|
||||
<div className="max-w-4xl mx-auto p-4 sm:p-6 space-y-8">
|
||||
<div className="flex items-center gap-6">
|
||||
<Avatar className="size-20">
|
||||
<AvatarImage src={mockUser.avatar} />
|
||||
<AvatarImage src={user.avatar} />
|
||||
<AvatarFallback className="text-2xl bg-primary/10 text-primary font-semibold">
|
||||
{mockUser.name.split(" ").map((n) => n[0]).join("")}
|
||||
{user.name.split(" ").map((n) => n[0]).join("")}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<div className="space-y-1.5">
|
||||
<h1 className="text-2xl font-bold">{mockUser.name}</h1>
|
||||
<p className="text-muted-foreground">{mockUser.email}</p>
|
||||
<h1 className="text-2xl font-bold">{user.name}</h1>
|
||||
<p className="text-muted-foreground">{user.email}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -75,9 +83,9 @@ export default function ProfilePage() {
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{mockComparisons.length > 0 ? (
|
||||
{comparisons.length > 0 ? (
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
{mockComparisons.map((comparison) => (
|
||||
{comparisons.map((comparison) => (
|
||||
<Link key={comparison.id} href={`/compare/${comparison.id}`}>
|
||||
<Card className="h-full transition-all hover:border-primary hover:shadow-md">
|
||||
<CardHeader className="pb-3">
|
||||
|
||||
Reference in New Issue
Block a user