Skip to content

Commit 6293a51

Browse files
authored
Merge pull request #13490 from ethereum/patch-color-mode-sync
Patch color mode sync
2 parents 4990bf4 + f6416ae commit 6293a51

26 files changed

+81
-54
lines changed

src/components/ActionCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ import {
88
LinkBox,
99
type LinkBoxProps,
1010
LinkOverlay,
11+
useColorModeValue,
1112
} from "@chakra-ui/react"
1213

1314
import { Image } from "@/components/Image"
1415
import { BaseLink } from "@/components/Link"
1516
import Text from "@/components/OldText"
1617

17-
import useColorModeValue from "@/hooks/useColorModeValue"
18-
1918
const linkBoxFocusStyles: BoxProps = {
2019
borderRadius: "base",
2120
boxShadow: "0px 8px 17px rgba(0, 0, 0, 0.15)",

src/components/CardList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import {
88
LinkBox,
99
LinkOverlay,
1010
type StackProps,
11+
useColorModeValue,
1112
} from "@chakra-ui/react"
1213

1314
import { BaseLink } from "@/components/Link"
1415

1516
import * as url from "@/lib/utils/url"
1617

17-
import useColorModeValue from "@/hooks/useColorModeValue"
1818
import { useRtlFlip } from "@/hooks/useRtlFlip"
1919

2020
export type CardListItem = {

src/components/CodeModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import {
66
ModalContent,
77
ModalHeader,
88
ModalOverlay,
9+
useColorModeValue,
910
} from "@chakra-ui/react"
1011

11-
import useColorModeValue from "@/hooks/useColorModeValue"
12-
1312
type CodeModalProps = {
1413
title: string
1514
children: ReactNode

src/components/Codeblock.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ import Highlight, {
66
PrismTheme,
77
} from "prism-react-renderer"
88
import Prism from "prism-react-renderer/prism"
9-
import { Box, BoxProps, Flex } from "@chakra-ui/react"
9+
import { Box, BoxProps, Flex, useColorModeValue } from "@chakra-ui/react"
1010

11+
// https://github.com/FormidableLabs/prism-react-renderer/tree/master#custom-language-support
1112
import CopyToClipboard from "@/components/CopyToClipboard"
1213
import Emoji from "@/components/Emoji"
1314

1415
import { LINES_BEFORE_COLLAPSABLE } from "@/lib/constants"
15-
16-
// https://github.com/FormidableLabs/prism-react-renderer/tree/master#custom-language-support
17-
import useColorModeValue from "@/hooks/useColorModeValue"
1816
;(typeof global !== "undefined" ? global : window).Prism = Prism
1917
require("prismjs/components/prism-solidity")
2018

src/components/DataProductCard.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import React from "react"
22
import { StaticImageData } from "next/image"
3-
import { Box, Flex, Heading, LinkBox, LinkOverlay } from "@chakra-ui/react"
3+
import {
4+
Box,
5+
Flex,
6+
Heading,
7+
LinkBox,
8+
LinkOverlay,
9+
useColorModeValue,
10+
} from "@chakra-ui/react"
411

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

714
import Text from "./OldText"
815

9-
import useColorModeValue from "@/hooks/useColorModeValue"
10-
1116
export interface DataRow {
1217
logo: StaticImageData
1318
coin: string

src/components/EnergyConsumptionChart/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ 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 { Box, Center, Text, useBreakpointValue } from "@chakra-ui/react"
15+
import {
16+
Box,
17+
Center,
18+
Text,
19+
useBreakpointValue,
20+
useColorModeValue,
21+
} from "@chakra-ui/react"
1622

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

1925
import { wrapLabel } from "@/lib/utils/charts"
2026
import { isLangRightToLeft } from "@/lib/utils/translations"
2127

22-
import useColorModeValue from "@/hooks/useColorModeValue"
2328
import { useIsClient } from "@/hooks/useIsClient"
2429

2530
// ChartDataLabels required to display y-labels on top of bars

src/components/EthVideo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Box } from "@chakra-ui/react"
2-
3-
import useColorModeValue from "@/hooks/useColorModeValue"
2+
import { useColorModeValue } from "@chakra-ui/react"
43

54
const EthVideo = () => {
65
const src = useColorModeValue(

src/components/Leaderboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
LinkOverlay,
88
List,
99
ListItem,
10+
useColorModeValue,
1011
VisuallyHidden,
1112
} from "@chakra-ui/react"
1213

@@ -15,7 +16,6 @@ import { BaseLink } from "@/components/Link"
1516

1617
import { GITHUB_URL } from "@/lib/constants"
1718

18-
import useColorModeValue from "@/hooks/useColorModeValue"
1919
import { useRtlFlip } from "@/hooks/useRtlFlip"
2020

2121
type Person = {

src/components/Logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useTranslation } from "next-i18next"
2+
import { useColorModeValue } from "@chakra-ui/react"
23

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

5-
import useColorModeValue from "@/hooks/useColorModeValue"
66
import darkImage from "@/public/images/ef-logo.png"
77
import lightImage from "@/public/images/ef-logo-white.png"
88

src/components/MeetupList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
LinkOverlay,
88
List,
99
ListItem,
10+
useColorModeValue,
1011
useToken,
1112
VisuallyHidden,
1213
} from "@chakra-ui/react"
@@ -22,7 +23,6 @@ import { trackCustomEvent } from "@/lib/utils/matomo"
2223

2324
import meetups from "@/data/community-meetups.json"
2425

25-
import useColorModeValue from "@/hooks/useColorModeValue"
2626
import { useRtlFlip } from "@/hooks/useRtlFlip"
2727

2828
export interface Meetup {

0 commit comments

Comments
 (0)