upd: role akses
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import {
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
Group,
|
||||
ThemeIcon,
|
||||
Box,
|
||||
import { BarChart, LineChart } from '@mantine/charts'
|
||||
import {
|
||||
Badge,
|
||||
Box,
|
||||
Group,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
ThemeIcon,
|
||||
useMantineTheme
|
||||
} from '@mantine/core'
|
||||
import { LineChart, BarChart } from '@mantine/charts'
|
||||
import { TbTimeline, TbChartBar, TbArrowUpRight } from 'react-icons/tb'
|
||||
import { TbArrowUpRight, TbChartBar, TbTimeline } from 'react-icons/tb'
|
||||
|
||||
interface ChartProps {
|
||||
data?: any[]
|
||||
@@ -18,7 +18,7 @@ interface ChartProps {
|
||||
|
||||
export function VillageActivityLineChart({ data = [], isLoading }: ChartProps) {
|
||||
const theme = useMantineTheme()
|
||||
|
||||
|
||||
return (
|
||||
<Paper withBorder p="xl" radius="2xl" className="glass h-full">
|
||||
<Stack gap="md" h="100%">
|
||||
@@ -32,9 +32,14 @@ export function VillageActivityLineChart({ data = [], isLoading }: ChartProps) {
|
||||
<Text size="xs" c="dimmed">Trend over the last 7 days</Text>
|
||||
</Box>
|
||||
</Group>
|
||||
<Badge variant="light" color="blue" size="sm" rightSection={<TbArrowUpRight size={12} />}>
|
||||
{isLoading ? '...' : 'Live'}
|
||||
</Badge>
|
||||
{
|
||||
isLoading && (
|
||||
<Badge variant="light" color="blue" size="sm" rightSection={<TbArrowUpRight size={12} />}>
|
||||
...
|
||||
</Badge>
|
||||
)
|
||||
}
|
||||
|
||||
</Group>
|
||||
|
||||
<Box h={300} mt="lg">
|
||||
@@ -91,12 +96,12 @@ export function VillageComparisonBarChart({ data = [], isLoading }: ChartProps)
|
||||
tickLine="none"
|
||||
gridAxis="y"
|
||||
barProps={{
|
||||
radius: [8, 8, 4, 4],
|
||||
radius: [8, 8, 4, 4],
|
||||
}}
|
||||
styles={{
|
||||
bar: {
|
||||
fill: 'url(#barGradient)',
|
||||
}
|
||||
bar: {
|
||||
fill: 'url(#barGradient)',
|
||||
}
|
||||
}}
|
||||
>
|
||||
<defs>
|
||||
|
||||
Reference in New Issue
Block a user