Skip to content

Commit cdf6b1b

Browse files
authored
Merge pull request #12278 from enjoyooor/props
chore: use `href` instead of deprecated to `prop` in InlineLink usage
2 parents cff7a87 + f5382c8 commit cdf6b1b

28 files changed

+117
-120
lines changed

src/components/CommunityEvents/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const Event = ({ event, language, type }: EventProps) => {
6767
</Text>
6868
</GridItem>
6969
<GridItem>
70-
<InlineLink to={calendarLink} onClick={() => matomoEvent(type)}>
70+
<InlineLink href={calendarLink} onClick={() => matomoEvent(type)}>
7171
{title}
7272
</InlineLink>
7373
</GridItem>

src/components/FileContributors.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const Contributor = ({ contributor }: { contributor: Author }) => {
6060
me={2}
6161
/>
6262
{contributor.user && (
63-
<InlineLink to={contributor.user.url}>
63+
<InlineLink href={contributor.user.url}>
6464
@{contributor.user.login}
6565
</InlineLink>
6666
)}
@@ -147,7 +147,7 @@ const FileContributors = ({
147147
<Text m={0} color="text200">
148148
<Translation id="last-edit" />:{" "}
149149
{lastContributor.user?.url && (
150-
<InlineLink to={lastContributor.user.url}>
150+
<InlineLink href={lastContributor.user.url}>
151151
@{lastContributor.user.login}
152152
</InlineLink>
153153
)}

src/components/History/NetworkUpgradeSummary.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ const NetworkUpgradeSummary = ({ name }: NetworkUpgradeSummaryProps) => {
4848

4949
const blockTypeTranslation = (translationKey, explorerUrl, number) => {
5050
return (
51-
<Flex whiteSpace='pre-wrap'>
51+
<Flex whiteSpace="pre-wrap">
5252
<Emoji fontSize="sm" me={2} text=":bricks:" />
5353
{t(translationKey)}:{" "}
54-
<InlineLink to={`${explorerUrl}${number}`}>
55-
{new Intl.NumberFormat(localeForStatsBoxNumbers).format(number)}
54+
<InlineLink href={`${explorerUrl}${number}`}>
55+
{new Intl.NumberFormat(localeForStatsBoxNumbers).format(number)}
5656
</InlineLink>
5757
</Flex>
5858
)
@@ -97,7 +97,7 @@ const NetworkUpgradeSummary = ({ name }: NetworkUpgradeSummaryProps) => {
9797
{waybackLink && (
9898
<Flex>
9999
<Emoji fontSize="sm" me={2} text=":desktop_computer:" />
100-
<InlineLink to={waybackLink}>
100+
<InlineLink href={waybackLink}>
101101
{t("page-history:page-history-ethereum-org-wayback")}
102102
</InlineLink>
103103
</Flex>

src/components/Layer2/Layer2Onboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const Layer2Onboard = ({
235235
<H4>{t("layer-2-onboard-wallet-title")}</H4>
236236
<Text>{t("layer-2-onboard-wallet-1")}</Text>
237237
<Text>
238-
<InlineLink to="/bridges/">
238+
<InlineLink href="/bridges/">
239239
{t("layer-2-more-on-bridges")}
240240
</InlineLink>
241241
</Text>
@@ -258,7 +258,7 @@ const Layer2Onboard = ({
258258
<Text>{t("layer-2-onboard-exchange-1")}</Text>
259259
<Text>
260260
{t("layer-2-onboard-exchange-2")}{" "}
261-
<InlineLink to="/wallets/find-wallet/">
261+
<InlineLink href="/wallets/find-wallet/">
262262
{t("layer-2-onboard-find-a-wallet")}
263263
</InlineLink>
264264
</Text>

src/components/Layer2ProductCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ const Layer2ProductCard = ({
8383
)}
8484
</Box>
8585
{bridge && (
86-
<InlineLink to={bridge}>
86+
<InlineLink href={bridge}>
8787
{name} {t("layer-2-bridge")}
8888
</InlineLink>
8989
)}
9090
{ecosystemPortal && (
91-
<InlineLink to={ecosystemPortal}>
91+
<InlineLink href={ecosystemPortal}>
9292
{name} {t("layer-2-ecosystem-portal")}
9393
</InlineLink>
9494
)}
9595
{tokenLists && (
96-
<InlineLink to={tokenLists}>
96+
<InlineLink href={tokenLists}>
9797
{name} {t("layer-2-token-lists")}
9898
</InlineLink>
9999
)}

src/components/MeetupList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const MeetupList = () => {
153153
{!filteredMeetups.length && (
154154
<InfoBanner emoji=":information_source:">
155155
<Translation id="page-community-meetuplist-no-meetups" />{" "}
156-
<InlineLink to="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-meetups.json">
156+
<InlineLink href="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-meetups.json">
157157
<Translation id="page-community-please-add-to-page" />
158158
</InlineLink>
159159
</InfoBanner>

src/components/RandomAppList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from "react"
1+
import { useEffect, useState } from "react"
22
import { shuffle } from "lodash"
33

44
import type { TranslationKey } from "@/lib/types"
@@ -62,7 +62,7 @@ const RandomAppList = () => {
6262
<ul>
6363
{randomAppList.map((item, idx) => (
6464
<li key={idx}>
65-
<InlineLink to={item.url}>{item.name}</InlineLink>
65+
<InlineLink href={item.url}>{item.name}</InlineLink>
6666
, <Translation id={item.description} />
6767
</li>
6868
))}

src/components/RollupProductDevDoc.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react"
21
import { Box, Flex, Heading, ListItem, UnorderedList } from "@chakra-ui/react"
32

43
import { layer2Data, Rollups, RollupType } from "@/data/layer-2/layer-2"
@@ -38,17 +37,17 @@ const RollupProductDevDoc = ({ rollupType }: RollupProductDevDocProps) => {
3837
)}
3938
<UnorderedList>
4039
<ListItem>
41-
<InlineLink to={website}>
40+
<InlineLink href={website}>
4241
<Translation id="rollup-component-website" />
4342
</InlineLink>
4443
</ListItem>
4544
<ListItem>
46-
<InlineLink to={developerDocs}>
45+
<InlineLink href={developerDocs}>
4746
<Translation id="rollup-component-developer-docs" />
4847
</InlineLink>
4948
</ListItem>
5049
<ListItem>
51-
<InlineLink to={l2beat}>
50+
<InlineLink href={l2beat}>
5251
<Translation id="rollup-component-technology-and-risk-summary" />
5352
</InlineLink>
5453
</ListItem>

src/components/StablecoinAccordion/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ReactNode } from "react"
21
import { useTranslation } from "next-i18next"
32
import { MdArrowForward } from "react-icons/md"
43
import {
@@ -136,7 +135,7 @@ const StablecoinAccordion = () => {
136135
</SectionTitle>
137136
<p>
138137
{t("page-stablecoins-accordion-swap-dapp-intro")}{" "}
139-
<InlineLink to="/get-eth/#dex">
138+
<InlineLink href="/get-eth/#dex">
140139
{t("page-stablecoins-accordion-swap-dapp-link")}
141140
</InlineLink>
142141
</p>
@@ -225,7 +224,7 @@ const StablecoinAccordion = () => {
225224
</SectionTitle>
226225
<p>
227226
{t("page-stablecoins-accordion-borrow-crypto-collateral-copy")}{" "}
228-
<InlineLink to="#how">
227+
<InlineLink href="#how">
229228
{t("page-stablecoins-accordion-borrow-crypto-collateral-link")}
230229
</InlineLink>
231230
</p>
@@ -249,7 +248,7 @@ const StablecoinAccordion = () => {
249248
</SectionTitle>
250249
<p>
251250
{t("page-stablecoins-accordion-borrow-risks-copy")}{" "}
252-
<InlineLink to="/eth/">
251+
<InlineLink href="/eth/">
253252
{t("page-stablecoins-accordion-borrow-risks-link")}
254253
</InlineLink>
255254
</p>

src/components/Staking/StakingStatsBox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
9696
<BeaconchainTooltip>
9797
<Text>{t("page-staking-stats-box-metric-1-tooltip")}</Text>
9898
{t("common:data-provided-by")}{" "}
99-
<InlineLink to="https://beaconcha.in/">Beaconcha.in</InlineLink>
99+
<InlineLink href="https://beaconcha.in/">Beaconcha.in</InlineLink>
100100
</BeaconchainTooltip>
101101
</Label>
102102
</Cell>
@@ -107,7 +107,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
107107
<BeaconchainTooltip>
108108
<Text>{t("page-staking-stats-box-metric-2-tooltip")}</Text>
109109
{t("common:data-provided-by")}{" "}
110-
<InlineLink to="https://beaconcha.in/">Beaconcha.in</InlineLink>
110+
<InlineLink href="https://beaconcha.in/">Beaconcha.in</InlineLink>
111111
</BeaconchainTooltip>
112112
</Label>
113113
</Cell>
@@ -118,7 +118,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
118118
<BeaconchainTooltip>
119119
<Text>{t("page-staking-stats-box-metric-3-tooltip")}</Text>
120120
{t("common:data-provided-by")}{" "}
121-
<InlineLink to="https://beaconcha.in/ethstore">
121+
<InlineLink href="https://beaconcha.in/ethstore">
122122
Beaconcha.in
123123
</InlineLink>
124124
</BeaconchainTooltip>

0 commit comments

Comments
 (0)