Skip to content

Commit c776943

Browse files
committed
[Dashboard] Remove react-icons (1) (#4980)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating icon imports in various components, replacing some icons from `react-icons` with corresponding icons from `lucide-react`, and modifying the icon usage in the `HomePageCodeBlock`, `CustomContractForm`, `PublisherSocials`, `EventsFeedItem`, and `FileInput` components. ### Detailed summary - Replaced `BsLightning` with `ZapIcon` in `HomePageCodeBlock`. - Replaced `FiHelpCircle` with `InfoIcon` in `CustomContractForm`. - Replaced `FiGlobe` with `GlobeIcon` in `PublisherSocials`. - Replaced `FiCopy` with `CopyIcon` and `FiChevronDown` with `ChevronDownIcon` in `EventsFeedItem`. - Replaced `FiUpload` with `UploadIcon` and `FiImage` with `ImageIcon` in `FileInput`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent abcbcd0 commit c776943

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ import { SolidityInput } from "contract-ui/components/solidity-inputs";
2323
import { useTrack } from "hooks/analytics/useTrack";
2424
import { useTxNotifications } from "hooks/useTxNotifications";
2525
import { replaceTemplateValues } from "lib/deployment/template-values";
26-
import { CircleAlertIcon, ExternalLinkIcon } from "lucide-react";
26+
import { CircleAlertIcon, ExternalLinkIcon, InfoIcon } from "lucide-react";
2727
import Link from "next/link";
2828
import { useCallback, useMemo } from "react";
2929
import { FormProvider, type UseFormReturn, useForm } from "react-hook-form";
30-
import { FiHelpCircle } from "react-icons/fi";
3130
import { ZERO_ADDRESS } from "thirdweb";
3231
import type { FetchDeployMetadataResult } from "thirdweb/contract";
3332
import {
@@ -856,7 +855,7 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
856855
<span className="tex-sm">
857856
Deploy at a deterministic address
858857
</span>
859-
<FiHelpCircle className="size-4" />
858+
<InfoIcon className="size-4" />
860859
</div>
861860
</ToolTipLabel>
862861
</CheckboxWithLabel>

apps/dashboard/src/components/contract-components/publisher/PublisherSocials.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ButtonGroup, type ButtonGroupProps, Icon } from "@chakra-ui/react";
1+
import { ButtonGroup, type ButtonGroupProps } from "@chakra-ui/react";
22
import { DiscordIcon } from "components/icons/brand-icons/DiscordIcon";
33
import { GithubIcon } from "components/icons/brand-icons/GithubIcon";
44
import { LinkedInIcon } from "components/icons/brand-icons/LinkedinIcon";
@@ -8,7 +8,7 @@ import { RedditIcon } from "components/icons/brand-icons/RedditIcon";
88
import { TelegramIcon } from "components/icons/brand-icons/TelegramIcon";
99
import { XIcon } from "components/icons/brand-icons/XIcon";
1010
import type { ProfileMetadata } from "constants/schemas";
11-
import { FiGlobe } from "react-icons/fi";
11+
import { GlobeIcon } from "lucide-react";
1212
import { LinkButton, TrackedIconButton } from "tw-components";
1313
import { hostnameEndsWith } from "../../../utils/url";
1414

@@ -80,7 +80,7 @@ export const PublisherSocials: React.FC<PublisherSocialsProps> = ({
8080
href={publisherProfile.website}
8181
bg="transparent"
8282
aria-label="website"
83-
icon={<Icon as={FiGlobe} />}
83+
icon={<GlobeIcon className="size-4" />}
8484
category={TRACKING_CATEGORY}
8585
label="website"
8686
/>

apps/dashboard/src/components/homepage/CodeBlock/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ import {
33
Code,
44
type CodeProps,
55
Flex,
6-
Icon,
76
IconButton,
87
useColorModeValue,
98
useTheme,
109
} from "@chakra-ui/react";
1110
import { useClipboard } from "hooks/useClipboard";
12-
import { CheckIcon, CopyIcon } from "lucide-react";
11+
import { CheckIcon, CopyIcon, ZapIcon } from "lucide-react";
1312
import { Highlight, themes } from "prism-react-renderer";
1413
import { useEffect, useRef, useState } from "react";
15-
import { BsLightning } from "react-icons/bs";
1614
import { useInView } from "react-intersection-observer";
1715
import { Text } from "tw-components";
1816

@@ -133,7 +131,7 @@ export const HomePageCodeBlock: React.FC<CodeBlockProps> = ({
133131
variant="ghost"
134132
colorScheme="gray"
135133
size="sm"
136-
icon={<Icon as={BsLightning} />}
134+
icon={<ZapIcon className="size-4" />}
137135
/>
138136
) : (
139137
<Box w="32px" />

apps/dashboard/src/components/shared/FileInput.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Button } from "@/components/ui/button";
33
import { cn } from "@/lib/utils";
44
import { useImageFileOrUrl } from "hooks/useImageFileOrUrl";
5-
import { EyeIcon, FilePlusIcon } from "lucide-react";
5+
import { EyeIcon, FilePlusIcon, ImageIcon, UploadIcon } from "lucide-react";
66
import Link from "next/link";
77
import { useCallback } from "react";
88
import {
@@ -11,7 +11,6 @@ import {
1111
type FileRejection,
1212
useDropzone,
1313
} from "react-dropzone";
14-
import { FiImage, FiUpload } from "react-icons/fi";
1514

1615
interface IFileInputProps {
1716
accept?: Accept;
@@ -127,7 +126,7 @@ export const FileInput: React.FC<IFileInputProps> = ({
127126
)}
128127
>
129128
<div className="flex flex-col items-center gap-2 text-muted-foreground">
130-
<FiUpload className="size-6" />
129+
<UploadIcon className="size-6" />
131130
<p className="text-center text-sm">{isDisabledText}</p>
132131
</div>
133132
</div>
@@ -146,7 +145,7 @@ export const FileInput: React.FC<IFileInputProps> = ({
146145
>
147146
{noDisplay ? (
148147
<div className="flex flex-col items-center gap-2 text-muted-foreground">
149-
<FiImage className="size-6" />
148+
<ImageIcon className="size-6" />
150149
<p className="text-sm">{fileType} uploaded</p>
151150
</div>
152151
) : fileUrl ? (
@@ -162,7 +161,7 @@ export const FileInput: React.FC<IFileInputProps> = ({
162161
) : (
163162
<div className="flex flex-col items-center gap-2.5 text-muted-foreground">
164163
<div className="flex items-center justify-center rounded-full border border-border bg-background p-3">
165-
<FiUpload className="size-5" />
164+
<UploadIcon className="size-5" />
166165
</div>
167166
{!disableHelperText && (
168167
<p className="text-center text-sm">

apps/dashboard/src/contract-ui/tabs/events/components/events-feed.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
Divider,
1616
Flex,
1717
FormControl,
18-
Icon,
1918
LightMode,
2019
List,
2120
Select,
@@ -26,10 +25,9 @@ import {
2625
} from "@chakra-ui/react";
2726
import { AnimatePresence, motion } from "framer-motion";
2827
import { useClipboard } from "hooks/useClipboard";
29-
import { CircleHelpIcon } from "lucide-react";
28+
import { ChevronDownIcon, CircleHelpIcon, CopyIcon } from "lucide-react";
3029
import { useSearchParams } from "next/navigation";
3130
import { Fragment, useMemo, useState } from "react";
32-
import { FiChevronDown, FiCopy } from "react-icons/fi";
3331
import { toast } from "sonner";
3432
import type { ThirdwebContract } from "thirdweb";
3533
import { stringify } from "thirdweb/utils";
@@ -258,7 +256,7 @@ const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
258256
toast.info("Transaction hash copied.");
259257
}}
260258
>
261-
<Icon as={FiCopy} boxSize={3} />
259+
<CopyIcon className="size-4" />
262260
</Button>
263261
</Tooltip>
264262
<Text fontFamily="mono" noOfLines={1}>
@@ -306,7 +304,7 @@ const EventsFeedItem: React.FC<EventsFeedItemProps> = ({
306304
{transaction.blockNumber}
307305
</Text>
308306
<div>
309-
<Icon as={FiChevronDown} />
307+
<ChevronDownIcon className="size-4" />
310308
</div>
311309
</div>
312310
</Box>

0 commit comments

Comments
 (0)