diff --git a/src/components/EnergyConsumptionChart/index.tsx b/src/components/EnergyConsumptionChart/index.tsx index b99fad70df5..a14ba629fa6 100644 --- a/src/components/EnergyConsumptionChart/index.tsx +++ b/src/components/EnergyConsumptionChart/index.tsx @@ -12,19 +12,16 @@ import ChartDataLabels from "chartjs-plugin-datalabels" import { useRouter } from "next/router" import { useTranslation } from "next-i18next" import { Bar } from "react-chartjs-2" -import { - Box, - Center, - Text, - useBreakpointValue, - useColorModeValue, -} from "@chakra-ui/react" +import { useBreakpointValue } from "@chakra-ui/react" import type { Lang } from "@/lib/types" +import { Center } from "@/components/ui/flex" + import { wrapLabel } from "@/lib/utils/charts" import { isLangRightToLeft } from "@/lib/utils/translations" +import useColorModeValue from "@/hooks/useColorModeValue" import { useIsClient } from "@/hooks/useIsClient" // ChartDataLabels required to display y-labels on top of bars @@ -237,26 +234,19 @@ const EnergyConsumptionChart = () => { } satisfies ChartData return ( - -
- +
+
+
{isClient && ( )} - +
- +

{t("page-what-is-ethereum-energy-consumption-chart-legend")} - - +

+
) }