58 lines
2.2 KiB
TypeScript
58 lines
2.2 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { ArrowLeft, ArrowRight, UserCircle2 } from "lucide-react";
|
|
import { useLanguage } from "@/components/language-provider";
|
|
import { Section, SectionHeading } from "@/components/ui/section";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
export function AccountPreview() {
|
|
const { t, lang } = useLanguage();
|
|
const Arrow = lang === "fa" ? ArrowLeft : ArrowRight;
|
|
|
|
return (
|
|
<Section id="preview" className="bg-slate-50 dark:bg-ink-soft/40">
|
|
<div className="container-x">
|
|
<SectionHeading
|
|
eyebrow={t.preview.eyebrow}
|
|
title={t.preview.title}
|
|
subtitle={t.preview.subtitle}
|
|
/>
|
|
|
|
<div className="mx-auto max-w-3xl rounded-3xl border border-slate-200 bg-white p-6 shadow-sm dark:border-white/10 dark:bg-white/[0.02] sm:p-8">
|
|
<div className="flex items-center gap-4">
|
|
<div className="flex h-16 w-16 items-center justify-center rounded-full bg-brand-gradient text-2xl font-bold text-white">
|
|
<UserCircle2 className="h-9 w-9" />
|
|
</div>
|
|
<div>
|
|
<div className="text-lg font-semibold text-slate-900 dark:text-white">MyAccount Hamsoo</div>
|
|
<div className="text-sm text-slate-500 dark:text-slate-400">user@hamsoo.com</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="mt-6 grid grid-cols-2 gap-3 sm:grid-cols-4">
|
|
{t.preview.cards.map((c) => (
|
|
<div
|
|
key={c.label}
|
|
className="rounded-2xl border border-slate-200 bg-slate-50 p-4 text-center dark:border-white/10 dark:bg-ink/40"
|
|
>
|
|
<div className="text-2xl font-bold gradient-text">{c.value}</div>
|
|
<div className="mt-1 text-xs text-slate-600 dark:text-slate-400">{c.label}</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
|
|
<div className="mt-6 flex justify-center">
|
|
<Link href="/account" className="inline-flex">
|
|
<Button size="sm">
|
|
{t.preview.cta}
|
|
<Arrow className="h-4 w-4 rtl:rotate-180" />
|
|
</Button>
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Section>
|
|
);
|
|
}
|