Skip to content

Commit 6c0ab6b

Browse files
refactor(components): replace and remove old link components
1 parent 77febed commit 6c0ab6b

File tree

19 files changed

+20
-214
lines changed

19 files changed

+20
-214
lines changed

src/components/FileContributors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { BaseHTMLAttributes, useState } from "react"
22

33
import type { ChildOnlyProp, FileContributor } from "@/lib/types"
44

5-
import InlineLink from "@/components/Link"
65
import Translation from "@/components/Translation"
76
import { Button } from "@/components/ui/buttons/Button"
87
import { Flex, VStack } from "@/components/ui/flex"
@@ -13,6 +12,7 @@ import { trackCustomEvent } from "@/lib/utils/matomo"
1312

1413
import { Avatar } from "./ui/avatar"
1514
import Modal from "./ui/dialog-modal"
15+
import InlineLink from "./ui/Link"
1616

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

src/components/Glossary/GlossaryTooltip/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { ReactNode } from "react"
22
import { useRouter } from "next/router"
33

4-
import InlineLink from "@/components/Link"
54
import Tooltip, { type TooltipProps } from "@/components/Tooltip"
65
import Translation from "@/components/Translation"
6+
import InlineLink from "@/components/ui/Link"
77

88
import { trackCustomEvent } from "@/lib/utils/matomo"
99
import { cleanPath } from "@/lib/utils/url"

src/components/History/NetworkUpgradeSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getLocaleForNumberFormat } from "@/lib/utils/translations"
1010

1111
import NetworkUpgradeSummaryData from "../../data/NetworkUpgradeSummaryData"
1212
import Emoji from "../Emoji"
13-
import InlineLink from "../Link"
13+
import InlineLink from "../ui/Link"
1414

1515
type NetworkUpgradeSummaryProps = {
1616
name: string

src/components/LanguagePicker/NoResultsCallout.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useTranslation } from "next-i18next"
22

3-
import { BaseLink } from "@/components/Link"
4-
5-
import MenuItem from "./MenuItem"
3+
import { BaseLink } from "../ui/Link"
64

75
type NoResultsCalloutProps = { onClose: () => void }
86

@@ -14,9 +12,7 @@ const NoResultsCallout = ({ onClose }: NoResultsCalloutProps) => {
1412
<p className="text-body-medium">
1513
{t("page-languages-want-more-paragraph")}
1614
</p>
17-
{/* TODO: use migrated Link component */}
1815
<BaseLink
19-
as={MenuItem}
2016
key="item-no-results"
2117
href="contributing/translation-program"
2218
onClick={onClose}

src/components/LanguagePicker/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useRouter } from "next/router"
22
import { useTranslation } from "next-i18next"
33

4-
import { BaseLink } from "@/components/Link"
5-
64
import { cn } from "@/lib/utils/cn"
75

86
import {
@@ -13,6 +11,7 @@ import {
1311
CommandList,
1412
} from "../ui/command"
1513
import { Dialog, DialogContent, DialogTrigger } from "../ui/dialog"
14+
import { BaseLink } from "../ui/Link"
1615
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover"
1716

1817
import MenuItem from "./MenuItem"

src/components/Layer2NetworksTable/NetworksSubComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { MdInfoOutline } from "react-icons/md"
22

33
import NetworkUsageChart from "@/components/Layer2NetworksTable/NetworkUsageChart"
4-
import InlineLink from "@/components/Link"
54
import Tooltip from "@/components/Tooltip"
65

76
import { ButtonLink } from "../ui/buttons/Button"
7+
import InlineLink from "../ui/Link"
88

99
const formatNumber = (num: number): string => {
1010
if (num >= 1e9) {

src/components/Layer2NetworksTable/hooks/useNetworkColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { ExtendedRollup, Lang } from "@/lib/types"
99
import { TableMeta } from "@/components/DataTable"
1010
import { Image } from "@/components/Image"
1111
import NetworkMaturityTooltip from "@/components/Layer2NetworksTable/NetworkMaturityTooltip"
12-
import InlineLink from "@/components/Link"
1312
import Tooltip from "@/components/Tooltip"
1413
import { Button } from "@/components/ui/buttons/Button"
14+
import InlineLink from "@/components/ui/Link"
1515
import { TableCell, TableHead } from "@/components/ui/table"
1616

1717
import { cn } from "@/lib/utils/cn"

src/components/Link.tsx

Lines changed: 0 additions & 191 deletions
This file was deleted.

src/components/RandomAppList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import shuffle from "lodash/shuffle"
33

44
import type { TranslationKey } from "@/lib/types"
55

6-
import InlineLink from "./Link"
6+
import InlineLink from "./ui/Link"
77
import Translation from "./Translation"
88

99
interface App {

src/components/Staking/StakingStatsBox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import { MdInfoOutline } from "react-icons/md"
44

55
import type { ChildOnlyProp, Lang, StakingStatsData } from "@/lib/types"
66

7-
import InlineLink from "@/components/Link"
87
import Tooltip from "@/components/Tooltip"
98
import { Flex, VStack } from "@/components/ui/flex"
109

1110
import { getLocaleForNumberFormat } from "@/lib/utils/translations"
1211

12+
import InlineLink from "../ui/Link"
13+
1314
const Cell = ({ children }: ChildOnlyProp) => (
1415
<VStack className="gap-2 px-8 py-4">{children}</VStack>
1516
)

0 commit comments

Comments
 (0)