Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 21:21:14 +00:00
co-authored by renee-png
parent 8ae65cadf1
commit d50e2f72ed
-32
View File
@@ -348,38 +348,6 @@ function Dashboard() {
</Card>
</div>
{/* Recent payments */}
<div className="grid lg:grid-cols-2 gap-6 mt-6">
<Card>
<CardHeader className="flex flex-row items-center justify-between">
<CardTitle className="text-base flex items-center gap-2">
<CreditCard className="h-4 w-4" />
Recent payments
</CardTitle>
<Button asChild variant="ghost" size="sm">
<Link to="/payments">View all <ArrowRight className="h-3 w-3 ml-1" /></Link>
</Button>
</CardHeader>
<CardContent className="space-y-1">
{recentPayments.length === 0 && <p className="text-sm text-muted-foreground">No payment requests yet.</p>}
{recentPayments.map((p) => (
<Link key={p.id} to="/pay/$id" params={{ id: p.id }}
className="flex items-center justify-between py-2.5 px-2 rounded-md hover:bg-muted/60 -mx-2">
<div className="min-w-0">
<div className="text-sm font-medium truncate">{p.recipient_name}</div>
<div className="text-xs text-muted-foreground truncate">
{p.description || "Payment request"} · {formatDate(p.paid_at || p.created_at)}
</div>
</div>
<div className="flex items-center gap-2">
<span className="text-sm font-medium">{formatCurrency((p.total_amount_cents ?? 0) / 100)}</span>
<Badge variant="outline" className={statusBadgeClass(p.status)}>{p.status}</Badge>
</div>
</Link>
))}
</CardContent>
</Card>
</div>
</PageContainer>
);
}