fix(ui): align portal stats and auth feedback

This commit is contained in:
poyrazavsever
2026-07-17 22:59:25 +03:00
parent ec824c0eec
commit 2fb7cebb1d
3 changed files with 13 additions and 28 deletions
+2 -27
View File
@@ -1,8 +1,9 @@
import { Card, CardContent, Badge } from "poyraz-ui/atoms";
import { FolderKanban, CheckCircle2, Clock, BarChart, type LucideIcon } from "lucide-react";
import { FolderKanban, CheckCircle2, Clock, BarChart } from "lucide-react";
import Link from "next/link";
import { format } from "date-fns";
import { tr } from "date-fns/locale";
import { StatCard } from "@/components/system/stat-card";
import { requirePortalBackend } from "@/server/web/portal";
export default async function PortalDashboardPage() {
@@ -76,29 +77,3 @@ export default async function PortalDashboardPage() {
</div>
);
}
function StatCard({ label, value, icon: Icon, tone }: {
label: string;
value: string;
icon: LucideIcon;
tone: "green" | "blue" | "amber";
}) {
const toneClass = {
green: "bg-emerald-50 text-emerald-700",
blue: "bg-blue-50 text-blue-700",
amber: "bg-amber-50 text-amber-700",
}[tone];
return (
<Card>
<CardContent className="flex items-center justify-between gap-3 p-4">
<div>
<p className="text-sm text-muted-foreground">{label}</p>
<p className="mt-1 text-2xl font-semibold text-foreground">{value}</p>
</div>
<div className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-sm ${toneClass}`}>
<Icon className="h-5 w-5" />
</div>
</CardContent>
</Card>
);
}