From 3a0c601151b81887ea265fd2399196138ed5dc61 Mon Sep 17 00:00:00 2001 From: Justin Wang Date: Mon, 16 Mar 2026 12:24:34 -0400 Subject: [PATCH] dashboard stats component --- .../src/components/dashboardStats.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apps/frontend/src/components/dashboardStats.tsx diff --git a/apps/frontend/src/components/dashboardStats.tsx b/apps/frontend/src/components/dashboardStats.tsx new file mode 100644 index 00000000..d8b8167b --- /dev/null +++ b/apps/frontend/src/components/dashboardStats.tsx @@ -0,0 +1,37 @@ +import { Box, SimpleGrid, Text } from '@chakra-ui/react'; + +type DashboardStatsProps = { + stats: Record; +}; + +// Called like: +export function DashboardStats({ stats }: DashboardStatsProps) { + const colors = ['blue.core', 'red', 'yellow.hover', 'teal.hover']; + + return ( + + {Object.entries(stats).map(([key, value], index) => { + const color = colors[index % colors.length]; + + return ( + + + {key} + + + {value} + + + ); + })} + + ); +}