File tree Expand file tree Collapse file tree 1 file changed +9
-22
lines changed
src/components/EnergyConsumptionChart Expand file tree Collapse file tree 1 file changed +9
-22
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,7 @@ import ChartDataLabels from "chartjs-plugin-datalabels"
12
12
import { useRouter } from "next/router"
13
13
import { useTranslation } from "next-i18next"
14
14
import { Bar } from "react-chartjs-2"
15
- import {
16
- Box ,
17
- Center ,
18
- Text ,
19
- useBreakpointValue ,
20
- useColorModeValue ,
21
- } from "@chakra-ui/react"
15
+ import { useBreakpointValue , useColorModeValue } from "@chakra-ui/react"
22
16
23
17
import type { Lang } from "@/lib/types"
24
18
@@ -237,26 +231,19 @@ const EnergyConsumptionChart = () => {
237
231
} satisfies ChartData
238
232
239
233
return (
240
- < Box my = { 16 } >
241
- < Center w = "full" mb = { { base : 4 , md : 6 } } >
242
- < Box
243
- position = "relative"
244
- maxW = "500px"
245
- m = "auto"
246
- w = "80vw"
247
- h = { { base : "300px" , md : "400px" } }
248
- mb = { { base : 4 , md : 0 } }
249
- >
234
+ < div className = "my-16" >
235
+ < div className = "mb-4 flex w-full items-center justify-center md:mb-6" >
236
+ < div className = "relative m-auto mb-4 h-[300px] w-[80vw] max-w-[500px] md:mb-0 md:h-[400px]" >
250
237
{ isClient && (
251
238
< Bar options = { chartOptions } data = { chartData } updateMode = "none" />
252
239
) }
253
- </ Box >
254
- </ Center >
240
+ </ div >
241
+ </ div >
255
242
256
- < Text fontWeight = "semibold" textAlign = " center">
243
+ < p className = "text- center font-semibold ">
257
244
{ t ( "page-what-is-ethereum-energy-consumption-chart-legend" ) }
258
- </ Text >
259
- </ Box >
245
+ </ p >
246
+ </ div >
260
247
)
261
248
}
262
249
You can’t perform that action at this time.
0 commit comments