Skip to content

Commit

Permalink
refactor: replace Chakra useBreakpointValue with local export
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerAPfledderer committed Aug 22, 2024
1 parent a03fc10 commit 8daf17d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/EnergyConsumptionChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import ChartDataLabels from "chartjs-plugin-datalabels"
import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"
import { Bar } from "react-chartjs-2"
import { useBreakpointValue } from "@chakra-ui/react"

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

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

import { useBreakpointValue } from "@/hooks/useBreakpointValue"
import useColorModeValue from "@/hooks/useColorModeValue"
import { useIsClient } from "@/hooks/useIsClient"

Expand Down
3 changes: 2 additions & 1 deletion src/components/Morpher.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useEffect, useState } from "react"
import { useBreakpointValue } from "@chakra-ui/react"

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

Expand All @@ -9,6 +8,8 @@ import {
MOBILE_LANGUAGE_BUTTON_NAME,
} from "@/lib/constants"

import { useBreakpointValue } from "@/hooks/useBreakpointValue"

const Morpher = () => {
const [state, setState] = useState({
text: "Ethereum",
Expand Down
10 changes: 3 additions & 7 deletions src/components/Simulator/WalletHome/NFTList.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import React from "react"
import {
Box,
Flex,
type FlexProps,
Text,
useBreakpointValue,
} from "@chakra-ui/react"
import { Box, Flex, type FlexProps, Text } from "@chakra-ui/react"

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

import type { NFT } from "./interfaces"

import { useBreakpointValue } from "@/hooks/useBreakpointValue"

type NFTListProps = FlexProps & {
nfts: Array<NFT>
}
Expand Down

0 comments on commit 8daf17d

Please sign in to comment.