From 4003dc7d2384eb35cec10e7830ce08b1350fcceb Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 3 Feb 2026 15:04:34 +0100 Subject: [PATCH] Statcard --- src/app/leaderboards/page.tsx | 35 +++++-------------- src/app/runs/page.tsx | 10 +++--- .../app/CenterStatCard.tsx} | 4 +-- 3 files changed, 16 insertions(+), 33 deletions(-) rename src/{app/runs/components/StatCard.tsx => components/app/CenterStatCard.tsx} (76%) diff --git a/src/app/leaderboards/page.tsx b/src/app/leaderboards/page.tsx index dc1aff7..87dea58 100644 --- a/src/app/leaderboards/page.tsx +++ b/src/app/leaderboards/page.tsx @@ -24,6 +24,7 @@ import { } from "@/components/ui/pagination"; import LeaderboardRow from "@/app/leaderboards/components/LeaderboardRow"; +import CenterStatCard from "@/components/app/CenterStatCard"; const globalLeaderboard = [ { @@ -190,10 +191,14 @@ export default function Leaderboards() { {/* Stats */}
- - - - + + + +
{/* Tabs + Filters */} @@ -269,25 +274,3 @@ export default function Leaderboards() { ); } - -/* ---------- helpers ---------- */ - -function StatCard({ - icon: Icon, - label, - value, -}: { - icon: any; - label: string; - value: string; -}) { - return ( - - - - {value} -

{label}

-
-
- ); -} diff --git a/src/app/runs/page.tsx b/src/app/runs/page.tsx index 6b91ca2..8fdca08 100644 --- a/src/app/runs/page.tsx +++ b/src/app/runs/page.tsx @@ -15,7 +15,7 @@ import { } from "@/components/ui/table"; import { cn } from "@/lib/utils"; import LiveRunRow from "./components/LiveRunNow"; -import StatCard from "./components/StatCard"; +import CenterStatCard from "@/components/app/CenterStatCard"; /* ---------------- mock data ---------------- */ @@ -81,10 +81,10 @@ export default function LiveRuns() { {/* Stats */}
- - - - + + + +
{/* Filters */} diff --git a/src/app/runs/components/StatCard.tsx b/src/components/app/CenterStatCard.tsx similarity index 76% rename from src/app/runs/components/StatCard.tsx rename to src/components/app/CenterStatCard.tsx index 963e918..db47525 100644 --- a/src/app/runs/components/StatCard.tsx +++ b/src/components/app/CenterStatCard.tsx @@ -1,6 +1,6 @@ -import { Card, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -export default function StatCard({ +export default function CenterStatCard({ icon: Icon, label, value,