import { BarChart, LineChart } from '@mantine/charts' import { Badge, Box, Group, Paper, Stack, Text, ThemeIcon, useMantineTheme } from '@mantine/core' import { TbArrowUpRight, TbChartBar, TbTimeline } from 'react-icons/tb' interface ChartProps { data?: any[] isLoading?: boolean } export function VillageActivityLineChart({ data = [], isLoading }: ChartProps) { const theme = useMantineTheme() return ( DAILY ACTIVITY - ALL VILLAGES Trend over the last 7 days { isLoading && ( }> ... ) } ) } export function VillageComparisonBarChart({ data = [], isLoading }: ChartProps) { const theme = useMantineTheme() return ( USAGE COMPARISON BETWEEN VILLAGES Most active village deployments { if (active && payload && payload.length) { return (
{payload[0].payload.village}
Activity: {payload[0].value}
); } return null; }, }} >
) }