diff --git a/src/app/components/common/Statistics.tsx b/src/app/components/common/Statistics.tsx new file mode 100644 index 0000000..5a5152e --- /dev/null +++ b/src/app/components/common/Statistics.tsx @@ -0,0 +1,30 @@ +'use client' + +import { Flex, StatGroup, Stat, StatLabel, StatNumber, StatHelpText, StatArrow } from '@chakra-ui/react' + +export const Statistics = ({ text, value, unit, diff }: { text: string, value: number, unit?: string, diff?: number }) => { + return ( + + + + { text } + { value.toLocaleString() }{ unit ?? '' } + { diff && + + { diff !== 0 && + 0) ? 'increase' : 'decrease' } /> + } + { diff.toLocaleString() } + + } + + + + + ) +} \ No newline at end of file diff --git a/src/app/components/layout/Navbar.tsx b/src/app/components/layout/Navbar.tsx index 31a6f39..b357c6a 100644 --- a/src/app/components/layout/Navbar.tsx +++ b/src/app/components/layout/Navbar.tsx @@ -78,7 +78,7 @@ export const Navbar = () => {