Skip to content

Commit 8daf17d

Browse files
refactor: replace Chakra useBreakpointValue with local export
1 parent a03fc10 commit 8daf17d

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/components/EnergyConsumptionChart/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import ChartDataLabels from "chartjs-plugin-datalabels"
1212
import { useRouter } from "next/router"
1313
import { useTranslation } from "next-i18next"
1414
import { Bar } from "react-chartjs-2"
15-
import { useBreakpointValue } from "@chakra-ui/react"
1615

1716
import type { Lang } from "@/lib/types"
1817

@@ -21,6 +20,7 @@ import { Center } from "@/components/ui/flex"
2120
import { wrapLabel } from "@/lib/utils/charts"
2221
import { isLangRightToLeft } from "@/lib/utils/translations"
2322

23+
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
2424
import useColorModeValue from "@/hooks/useColorModeValue"
2525
import { useIsClient } from "@/hooks/useIsClient"
2626

src/components/Morpher.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useEffect, useState } from "react"
2-
import { useBreakpointValue } from "@chakra-ui/react"
32

43
import { Button } from "@/components/Buttons"
54

@@ -9,6 +8,8 @@ import {
98
MOBILE_LANGUAGE_BUTTON_NAME,
109
} from "@/lib/constants"
1110

11+
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
12+
1213
const Morpher = () => {
1314
const [state, setState] = useState({
1415
text: "Ethereum",

src/components/Simulator/WalletHome/NFTList.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import React from "react"
2-
import {
3-
Box,
4-
Flex,
5-
type FlexProps,
6-
Text,
7-
useBreakpointValue,
8-
} from "@chakra-ui/react"
2+
import { Box, Flex, type FlexProps, Text } from "@chakra-ui/react"
93

104
import { Image } from "@/components/Image"
115

126
import type { NFT } from "./interfaces"
137

8+
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
9+
1410
type NFTListProps = FlexProps & {
1511
nfts: Array<NFT>
1612
}

0 commit comments

Comments
 (0)