Skip to content

Commit

Permalink
Merge pull request #12278 from enjoyooor/props
Browse files Browse the repository at this point in the history
chore: use `href` instead of deprecated to `prop` in InlineLink usage
  • Loading branch information
pettinarip authored Mar 7, 2024
2 parents cff7a87 + f5382c8 commit cdf6b1b
Show file tree
Hide file tree
Showing 28 changed files with 117 additions and 120 deletions.
2 changes: 1 addition & 1 deletion src/components/CommunityEvents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Event = ({ event, language, type }: EventProps) => {
</Text>
</GridItem>
<GridItem>
<InlineLink to={calendarLink} onClick={() => matomoEvent(type)}>
<InlineLink href={calendarLink} onClick={() => matomoEvent(type)}>
{title}
</InlineLink>
</GridItem>
Expand Down
4 changes: 2 additions & 2 deletions src/components/FileContributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Contributor = ({ contributor }: { contributor: Author }) => {
me={2}
/>
{contributor.user && (
<InlineLink to={contributor.user.url}>
<InlineLink href={contributor.user.url}>
@{contributor.user.login}
</InlineLink>
)}
Expand Down Expand Up @@ -147,7 +147,7 @@ const FileContributors = ({
<Text m={0} color="text200">
<Translation id="last-edit" />:{" "}
{lastContributor.user?.url && (
<InlineLink to={lastContributor.user.url}>
<InlineLink href={lastContributor.user.url}>
@{lastContributor.user.login}
</InlineLink>
)}
Expand Down
8 changes: 4 additions & 4 deletions src/components/History/NetworkUpgradeSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const NetworkUpgradeSummary = ({ name }: NetworkUpgradeSummaryProps) => {

const blockTypeTranslation = (translationKey, explorerUrl, number) => {
return (
<Flex whiteSpace='pre-wrap'>
<Flex whiteSpace="pre-wrap">
<Emoji fontSize="sm" me={2} text=":bricks:" />
{t(translationKey)}:{" "}
<InlineLink to={`${explorerUrl}${number}`}>
{new Intl.NumberFormat(localeForStatsBoxNumbers).format(number)}
<InlineLink href={`${explorerUrl}${number}`}>
{new Intl.NumberFormat(localeForStatsBoxNumbers).format(number)}
</InlineLink>
</Flex>
)
Expand Down Expand Up @@ -97,7 +97,7 @@ const NetworkUpgradeSummary = ({ name }: NetworkUpgradeSummaryProps) => {
{waybackLink && (
<Flex>
<Emoji fontSize="sm" me={2} text=":desktop_computer:" />
<InlineLink to={waybackLink}>
<InlineLink href={waybackLink}>
{t("page-history:page-history-ethereum-org-wayback")}
</InlineLink>
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layer2/Layer2Onboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const Layer2Onboard = ({
<H4>{t("layer-2-onboard-wallet-title")}</H4>
<Text>{t("layer-2-onboard-wallet-1")}</Text>
<Text>
<InlineLink to="/bridges/">
<InlineLink href="/bridges/">
{t("layer-2-more-on-bridges")}
</InlineLink>
</Text>
Expand All @@ -258,7 +258,7 @@ const Layer2Onboard = ({
<Text>{t("layer-2-onboard-exchange-1")}</Text>
<Text>
{t("layer-2-onboard-exchange-2")}{" "}
<InlineLink to="/wallets/find-wallet/">
<InlineLink href="/wallets/find-wallet/">
{t("layer-2-onboard-find-a-wallet")}
</InlineLink>
</Text>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Layer2ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ const Layer2ProductCard = ({
)}
</Box>
{bridge && (
<InlineLink to={bridge}>
<InlineLink href={bridge}>
{name} {t("layer-2-bridge")}
</InlineLink>
)}
{ecosystemPortal && (
<InlineLink to={ecosystemPortal}>
<InlineLink href={ecosystemPortal}>
{name} {t("layer-2-ecosystem-portal")}
</InlineLink>
)}
{tokenLists && (
<InlineLink to={tokenLists}>
<InlineLink href={tokenLists}>
{name} {t("layer-2-token-lists")}
</InlineLink>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MeetupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const MeetupList = () => {
{!filteredMeetups.length && (
<InfoBanner emoji=":information_source:">
<Translation id="page-community-meetuplist-no-meetups" />{" "}
<InlineLink to="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-meetups.json">
<InlineLink href="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-meetups.json">
<Translation id="page-community-please-add-to-page" />
</InlineLink>
</InfoBanner>
Expand Down
4 changes: 2 additions & 2 deletions src/components/RandomAppList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react"
import { useEffect, useState } from "react"
import { shuffle } from "lodash"

import type { TranslationKey } from "@/lib/types"
Expand Down Expand Up @@ -62,7 +62,7 @@ const RandomAppList = () => {
<ul>
{randomAppList.map((item, idx) => (
<li key={idx}>
<InlineLink to={item.url}>{item.name}</InlineLink>
<InlineLink href={item.url}>{item.name}</InlineLink>
, <Translation id={item.description} />
</li>
))}
Expand Down
7 changes: 3 additions & 4 deletions src/components/RollupProductDevDoc.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react"
import { Box, Flex, Heading, ListItem, UnorderedList } from "@chakra-ui/react"

import { layer2Data, Rollups, RollupType } from "@/data/layer-2/layer-2"
Expand Down Expand Up @@ -38,17 +37,17 @@ const RollupProductDevDoc = ({ rollupType }: RollupProductDevDocProps) => {
)}
<UnorderedList>
<ListItem>
<InlineLink to={website}>
<InlineLink href={website}>
<Translation id="rollup-component-website" />
</InlineLink>
</ListItem>
<ListItem>
<InlineLink to={developerDocs}>
<InlineLink href={developerDocs}>
<Translation id="rollup-component-developer-docs" />
</InlineLink>
</ListItem>
<ListItem>
<InlineLink to={l2beat}>
<InlineLink href={l2beat}>
<Translation id="rollup-component-technology-and-risk-summary" />
</InlineLink>
</ListItem>
Expand Down
7 changes: 3 additions & 4 deletions src/components/StablecoinAccordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ReactNode } from "react"
import { useTranslation } from "next-i18next"
import { MdArrowForward } from "react-icons/md"
import {
Expand Down Expand Up @@ -136,7 +135,7 @@ const StablecoinAccordion = () => {
</SectionTitle>
<p>
{t("page-stablecoins-accordion-swap-dapp-intro")}{" "}
<InlineLink to="/get-eth/#dex">
<InlineLink href="/get-eth/#dex">
{t("page-stablecoins-accordion-swap-dapp-link")}
</InlineLink>
</p>
Expand Down Expand Up @@ -225,7 +224,7 @@ const StablecoinAccordion = () => {
</SectionTitle>
<p>
{t("page-stablecoins-accordion-borrow-crypto-collateral-copy")}{" "}
<InlineLink to="#how">
<InlineLink href="#how">
{t("page-stablecoins-accordion-borrow-crypto-collateral-link")}
</InlineLink>
</p>
Expand All @@ -249,7 +248,7 @@ const StablecoinAccordion = () => {
</SectionTitle>
<p>
{t("page-stablecoins-accordion-borrow-risks-copy")}{" "}
<InlineLink to="/eth/">
<InlineLink href="/eth/">
{t("page-stablecoins-accordion-borrow-risks-link")}
</InlineLink>
</p>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Staking/StakingStatsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
<BeaconchainTooltip>
<Text>{t("page-staking-stats-box-metric-1-tooltip")}</Text>
{t("common:data-provided-by")}{" "}
<InlineLink to="https://beaconcha.in/">Beaconcha.in</InlineLink>
<InlineLink href="https://beaconcha.in/">Beaconcha.in</InlineLink>
</BeaconchainTooltip>
</Label>
</Cell>
Expand All @@ -107,7 +107,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
<BeaconchainTooltip>
<Text>{t("page-staking-stats-box-metric-2-tooltip")}</Text>
{t("common:data-provided-by")}{" "}
<InlineLink to="https://beaconcha.in/">Beaconcha.in</InlineLink>
<InlineLink href="https://beaconcha.in/">Beaconcha.in</InlineLink>
</BeaconchainTooltip>
</Label>
</Cell>
Expand All @@ -118,7 +118,7 @@ const StakingStatsBox = ({ data }: StakingStatsBoxProps) => {
<BeaconchainTooltip>
<Text>{t("page-staking-stats-box-metric-3-tooltip")}</Text>
{t("common:data-provided-by")}{" "}
<InlineLink to="https://beaconcha.in/ethstore">
<InlineLink href="https://beaconcha.in/ethstore">
Beaconcha.in
</InlineLink>
</BeaconchainTooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/components/StatsBoxGrid/GridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Translation from "../Translation"
const tooltipContent = (metric: StatsBoxMetric) => (
<div>
<Translation id="data-provided-by" />{" "}
<InlineLink to={metric.apiUrl}>{metric.apiProvider}</InlineLink>
<InlineLink href={metric.apiUrl}>{metric.apiProvider}</InlineLink>
</div>
)

Expand Down
2 changes: 1 addition & 1 deletion src/components/TutorialMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const TutorialMetadata = ({
{hasSource && (
<Box>
<Emoji fontSize="sm" me={2} text=":books:" />
<InlineLink to={frontmatter.sourceUrl}>
<InlineLink href={frontmatter.sourceUrl}>
{frontmatter.source}
</InlineLink>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/components/UpcomingEventsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const UpcomingEventsList = () => {
return (
<InfoBanner emoji=":information_source:">
{t("page-community-upcoming-events-no-events")}{" "}
<InlineLink to="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-events.json">
<InlineLink href="https://github.com/ethereum/ethereum-org-website/blob/dev/src/data/community-events.json">
{t("page-community-please-add-to-page")}
</InlineLink>
</InfoBanner>
Expand Down
3 changes: 1 addition & 2 deletions src/components/UpgradeBannerNotification.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react"
import { Box } from "@chakra-ui/react"

import BannerNotification from "./BannerNotification"
Expand All @@ -13,7 +12,7 @@ const UpgradeBannerNotification = () => (
We&apos;ve deprecated our use of &apos;Eth1&apos; and &apos;Eth2&apos;
terms.
</b>{" "}
<InlineLink to="https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/">
<InlineLink href="https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/">
Read the full announcement
</InlineLink>
</Box>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ const AssetsPage = () => {
</Heading>
</Center>
<Center>
<InlineLink to="/assets/#illustrations">
<InlineLink href="/assets/#illustrations">
{t("page-assets-illustrations")}
</InlineLink>
</Center>
<Center>
<InlineLink to="/assets/#historical">
<InlineLink href="/assets/#historical">
{t("page-assets-historical-artwork")}
</InlineLink>
</Center>
<Center>
<InlineLink to="/assets/#brand">
<InlineLink href="/assets/#brand">
{t("page-assets-ethereum-brand-assets")}
</InlineLink>
</Center>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const TranslatorAcknowledgements = () => {
{t(
"page-contributing-translation-program-acknowledgements-acknowledgement-page-3"
)}{" "}
<InlineLink to="/contributing/translation-program/contributors/">
<InlineLink href="/contributing/translation-program/contributors/">
{t(
"page-contributing-translation-program-acknowledgements-acknowledgement-page-link"
)}
Expand Down Expand Up @@ -283,7 +283,7 @@ const TranslatorAcknowledgements = () => {
{t(
"page-contributing-translation-program-acknowledgements-how-to-claim-1"
)}{" "}
<InlineLink to="https://discord.gg/CetY6Y4">
<InlineLink href="https://discord.gg/CetY6Y4">
{t(
"page-contributing-translation-program-acknowledgements-how-to-claim-1-discord"
)}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/contributing/translation-program/contributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Contributors = () => {
</Text>
<Text>
{t("page-languages:page-languages-interested")}{" "}
<InlineLink to="/contributing/translation-program/">
<InlineLink href="/contributing/translation-program/">
{t("page-languages:page-languages-learn-more")}
</InlineLink>
.
Expand Down Expand Up @@ -178,7 +178,7 @@ const Contributors = () => {
</SimpleGrid>
<Text>
{t("page-languages:page-languages-interested")}{" "}
<InlineLink to="/contributing/translation-program/">
<InlineLink href="/contributing/translation-program/">
{t("page-languages:page-languages-learn-more")}
</InlineLink>
.
Expand Down
8 changes: 5 additions & 3 deletions src/pages/dapps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ import dai from "@/public/dapps/stabledai.png"
import status from "@/public/dapps/status.png"
import superrare from "@/public/dapps/superrare.png"
import synthetix from "@/public/dapps/synthetix.png"
import uniswapec from "@/public/dapps/uni.png"
import uniswap from "@/public/dapps/uni.png"
import {
default as uniswap,
default as uniswapec,
} from "@/public/dapps/uni.png"
import xmtp from "@/public/dapps/xmtp.png"
import yearn from "@/public/dapps/yearn.png"
import zapper from "@/public/dapps/zapper.png"
Expand Down Expand Up @@ -1857,7 +1859,7 @@ const DappsPage = () => {
<Text textAlign={{ base: "left", sm: "center" }} maxW="800px" mb={4}>
{t("page-dapps-magic-behind-dapps-description")}
</Text>
<InlineLink to="/what-is-ethereum/">
<InlineLink href="/what-is-ethereum/">
{t("page-dapps-magic-behind-dapps-link")}
</InlineLink>
</Flex>
Expand Down
Loading

0 comments on commit cdf6b1b

Please sign in to comment.