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} + + + ); + })} + + ); +}