From fc67140943448b00af749331a3e520b67f155147 Mon Sep 17 00:00:00 2001 From: Peiman <25097709+Rickk137@users.noreply.github.com> Date: Wed, 15 May 2024 13:01:14 +0330 Subject: [PATCH] fix: improve ultrasound ui elements (#265) * fix: improve ultrasound ui elements * fix: ci issue * fix: unused component --- ultrasound/ui/components/Chart.tsx | 6 +++--- .../ui/components/CurrentSupplyStats.tsx | 2 ++ ultrasound/ui/components/Header.tsx | 11 +++++++++-- ultrasound/ui/components/Main.tsx | 18 ++++++++++++++---- ultrasound/ui/components/SupplyChangeStats.tsx | 2 ++ ultrasound/ui/hooks/useSNXPrice.ts | 2 +- ultrasound/ui/mutations/useSellSNX.ts | 2 +- 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/ultrasound/ui/components/Chart.tsx b/ultrasound/ui/components/Chart.tsx index 7773a536d..7b9facce9 100644 --- a/ultrasound/ui/components/Chart.tsx +++ b/ultrasound/ui/components/Chart.tsx @@ -1,4 +1,4 @@ -import { Flex, Heading, Spinner, Tab, TabList, Tabs } from '@chakra-ui/react'; +import { Flex, Heading, Tab, TabList, Tabs } from '@chakra-ui/react'; import { useBurnEvents } from '../hooks/useBurnEvents'; import { Line } from 'react-chartjs-2'; import { @@ -19,14 +19,14 @@ export function Chart() { const [range, setRange] = useState<'groupedByMonths' | 'groupedByLast30Days'>('groupedByMonths'); const { data: events, isLoading } = useBurnEvents(); - if (isLoading) return ; - if (!events) return; + if (!events || isLoading) return null; return ( - + @@ -31,7 +38,7 @@ export function Header() { - + + - + ultrasound.homes @@ -39,9 +43,15 @@ export function Main() { - + - + diff --git a/ultrasound/ui/components/SupplyChangeStats.tsx b/ultrasound/ui/components/SupplyChangeStats.tsx index abfff1f69..e3cbb8090 100644 --- a/ultrasound/ui/components/SupplyChangeStats.tsx +++ b/ultrasound/ui/components/SupplyChangeStats.tsx @@ -8,6 +8,8 @@ export function SupplyChangeStats() { return (