Skip to content

Commit 79c50cb

Browse files
committed
[Dashboard] Remove react-icons (1) (#4882)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on replacing various icon components with `PlusIcon` and `UploadIcon` from the `lucide-react` library, enhancing the UI consistency across the application. ### Detailed summary - Replaced `Upload` component with `UploadIcon` in `airdrop-upload-erc20.tsx` and `upload-step.tsx`. - Updated `FiPlus` icons to `PlusIcon` in multiple components, including `external-links-fieldset.tsx`, `NFTMintButton.tsx`, and more. - Removed unused `Icon` imports from several files. - Adjusted icon classes for consistent styling. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 764ee8c commit 79c50cb

File tree

14 files changed

+43
-50
lines changed

14 files changed

+43
-50
lines changed

apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
UnorderedList,
1010
} from "@chakra-ui/react";
1111
import type { Abi } from "abitype";
12+
import { PlusIcon } from "lucide-react";
1213
import { type Dispatch, type SetStateAction, useEffect } from "react";
1314
import { Controller, useFieldArray, useFormContext } from "react-hook-form";
14-
import { FiPlus, FiTrash } from "react-icons/fi";
15+
import { FiTrash } from "react-icons/fi";
1516
import { Button, Heading, Text } from "tw-components";
1617
import { useCustomFactoryAbi } from "../hooks";
1718
import { NetworkDropdown } from "./NetworkDropdown";
@@ -112,7 +113,7 @@ export const CustomFactory: React.FC<CustomFactoryProps> = ({
112113
size="sm"
113114
colorScheme="primary"
114115
borderRadius="md"
115-
leftIcon={<Icon as={FiPlus} />}
116+
leftIcon={<PlusIcon className="size-5" />}
116117
onClick={() => append({ key: "", value: "" })}
117118
>
118119
Add Network

apps/dashboard/src/components/contract-components/contract-publish-form/external-links-fieldset.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Flex, Icon } from "@chakra-ui/react";
1+
import { Flex } from "@chakra-ui/react";
2+
import { PlusIcon } from "lucide-react";
23
import { useEffect } from "react";
34
import { useFieldArray, useFormContext } from "react-hook-form";
4-
import { FiPlus } from "react-icons/fi";
55
import { Button, Heading, Text } from "tw-components";
66
import { ExternalLinksInput } from "./external-links-input";
77

@@ -43,7 +43,7 @@ export const ExternalLinksFieldset = () => {
4343
size="sm"
4444
colorScheme="primary"
4545
borderRadius="md"
46-
leftIcon={<Icon as={FiPlus} />}
46+
leftIcon={<PlusIcon className="size-5" />}
4747
onClick={() =>
4848
append({
4949
name: "",

apps/dashboard/src/components/contract-pages/forms/properties.shared.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Tooltip,
1010
} from "@chakra-ui/react";
1111
import { FileInput } from "components/shared/FileInput";
12+
import { PlusIcon } from "lucide-react";
1213
import { useEffect } from "react";
1314
import {
1415
type ArrayPath,
@@ -23,7 +24,7 @@ import {
2324
type WatchObserver,
2425
useFieldArray,
2526
} from "react-hook-form";
26-
import { FiPlus, FiSlash, FiTrash, FiUpload, FiX } from "react-icons/fi";
27+
import { FiSlash, FiTrash, FiUpload, FiX } from "react-icons/fi";
2728
import { Button, FormErrorMessage, FormLabel } from "tw-components";
2829

2930
type OptionalPropertiesInput = {
@@ -179,7 +180,7 @@ export const PropertiesFormControl = <
179180
})}
180181
<div className="flex flex-row gap-2">
181182
<Button
182-
leftIcon={<Icon as={FiPlus} />}
183+
leftIcon={<PlusIcon className="size-5" />}
183184
colorScheme="purple"
184185
size="sm"
185186
onClick={() =>

apps/dashboard/src/contract-ui/tabs/claim-conditions/components/claim-conditions-form/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
AlertTitle,
1111
Box,
1212
Flex,
13-
Icon,
1413
Menu,
1514
MenuButton,
1615
MenuList,
@@ -20,15 +19,14 @@ import { TransactionButton } from "components/buttons/TransactionButton";
2019
import { SnapshotUpload } from "contract-ui/tabs/claim-conditions/components/snapshot-upload";
2120
import { useTrack } from "hooks/analytics/useTrack";
2221
import { useTxNotifications } from "hooks/useTxNotifications";
23-
import { CircleHelpIcon } from "lucide-react";
22+
import { CircleHelpIcon, PlusIcon } from "lucide-react";
2423
import { Fragment, createContext, useContext, useMemo, useState } from "react";
2524
import {
2625
type UseFieldArrayReturn,
2726
type UseFormReturn,
2827
useFieldArray,
2928
useForm,
3029
} from "react-hook-form";
31-
import { FiPlus } from "react-icons/fi";
3230
import {
3331
NATIVE_TOKEN_ADDRESS,
3432
type ThirdwebContract,
@@ -567,7 +565,7 @@ export const ClaimConditionsForm: React.FC<ClaimConditionsFormProps> = ({
567565
colorScheme="primary"
568566
variant={phases?.length > 0 ? "outline" : "solid"}
569567
borderRadius="md"
570-
leftIcon={<Icon as={FiPlus} />}
568+
leftIcon={<PlusIcon className="size-5" />}
571569
isDisabled={
572570
sendTx.isPending || (!isMultiPhase && phases?.length > 0)
573571
}

apps/dashboard/src/contract-ui/tabs/nfts/components/lazy-mint-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22
import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only";
3-
import { Icon, useDisclosure } from "@chakra-ui/react";
4-
import { FiPlus } from "react-icons/fi";
3+
import { useDisclosure } from "@chakra-ui/react";
4+
import { PlusIcon } from "lucide-react";
55
import type { ThirdwebContract } from "thirdweb";
66
import { Button, Drawer } from "tw-components";
77
import { LazyMintNftForm } from "./lazy-mint-form";
@@ -30,7 +30,7 @@ export const NFTLazyMintButton: React.FC<NFTLazyMintButtonProps> = ({
3030
</Drawer>
3131
<Button
3232
colorScheme="primary"
33-
leftIcon={<Icon as={FiPlus} />}
33+
leftIcon={<PlusIcon className="size-5" />}
3434
{...restButtonProps}
3535
onClick={onOpen}
3636
>

apps/dashboard/src/contract-ui/tabs/nfts/components/mint-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client";
22

33
import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only";
4-
import { Icon, useDisclosure } from "@chakra-ui/react";
5-
import { FiPlus } from "react-icons/fi";
4+
import { useDisclosure } from "@chakra-ui/react";
5+
import { PlusIcon } from "lucide-react";
66
import type { ThirdwebContract } from "thirdweb";
77
import { Button, Drawer } from "tw-components";
88
import { NFTMintForm } from "./mint-form";
@@ -31,7 +31,7 @@ export const NFTMintButton: React.FC<NFTMintButtonProps> = ({
3131
</Drawer>
3232
<Button
3333
colorScheme="primary"
34-
leftIcon={<Icon as={FiPlus} />}
34+
leftIcon={<PlusIcon className="size-5" />}
3535
{...restButtonProps}
3636
onClick={onOpen}
3737
>

apps/dashboard/src/contract-ui/tabs/nfts/components/shared-metadata-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client";
22

33
import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only";
4-
import { Icon, useDisclosure } from "@chakra-ui/react";
5-
import { FiPlus } from "react-icons/fi";
4+
import { useDisclosure } from "@chakra-ui/react";
5+
import { PlusIcon } from "lucide-react";
66
import type { ThirdwebContract } from "thirdweb";
77
import { Button, Drawer } from "tw-components";
88
import { SharedMetadataForm } from "./shared-metadata-form";
@@ -28,7 +28,7 @@ export const NFTSharedMetadataButton: React.FC<
2828
</Drawer>
2929
<Button
3030
colorScheme="primary"
31-
leftIcon={<Icon as={FiPlus} />}
31+
leftIcon={<PlusIcon className="size-5" />}
3232
{...restButtonProps}
3333
onClick={onOpen}
3434
>

apps/dashboard/src/contract-ui/tabs/proposals/components/proposal-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client";
22

3-
import { Icon, useDisclosure } from "@chakra-ui/react";
3+
import { useDisclosure } from "@chakra-ui/react";
44
import { TransactionButton } from "components/buttons/TransactionButton";
5-
import { FiPlus } from "react-icons/fi";
5+
import { PlusIcon } from "lucide-react";
66
import type { ThirdwebContract } from "thirdweb";
77
import { useSendAndConfirmTransaction } from "thirdweb/react";
88
import { Button, Drawer } from "tw-components";
@@ -60,7 +60,7 @@ export const ProposalButton: React.FC<VoteButtonProps> = ({ contract }) => {
6060
<Button
6161
colorScheme="primary"
6262
onClick={onOpen}
63-
leftIcon={<Icon as={FiPlus} />}
63+
leftIcon={<PlusIcon className="size-5" />}
6464
>
6565
Create Proposal
6666
</Button>

apps/dashboard/src/contract-ui/tabs/settings/components/metadata.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import { CommonContractSchema } from "constants/schemas";
1717
import { useTrack } from "hooks/analytics/useTrack";
1818
import { useImageFileOrUrl } from "hooks/useImageFileOrUrl";
1919
import { useTxNotifications } from "hooks/useTxNotifications";
20+
import { PlusIcon } from "lucide-react";
2021
import { useMemo } from "react";
2122
import { useFieldArray, useForm } from "react-hook-form";
22-
import { FiPlus, FiTrash } from "react-icons/fi";
23+
import { FiTrash } from "react-icons/fi";
2324
import type { ThirdwebContract } from "thirdweb";
2425
import {
2526
getContractMetadata,
@@ -317,7 +318,7 @@ export const SettingsMetadata = ({
317318
size="sm"
318319
colorScheme="primary"
319320
borderRadius="md"
320-
leftIcon={<Icon as={FiPlus} />}
321+
leftIcon={<PlusIcon className="size-5" />}
321322
onClick={() => append({ key: "", value: "" })}
322323
>
323324
Add URL

apps/dashboard/src/contract-ui/tabs/shared-components/list-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"use client";
22

33
import { ListerOnly } from "@3rdweb-sdk/react/components/roles/lister-only";
4-
import { Icon, useDisclosure } from "@chakra-ui/react";
4+
import { useDisclosure } from "@chakra-ui/react";
55
import { TransactionButton } from "components/buttons/TransactionButton";
6+
import { PlusIcon } from "lucide-react";
67
import { useState } from "react";
7-
import { FiPlus } from "react-icons/fi";
88
import type { ThirdwebContract } from "thirdweb";
99
import { useActiveAccount } from "thirdweb/react";
1010
import { Button, Drawer } from "tw-components";
@@ -71,7 +71,7 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
7171
</Drawer>
7272
<Button
7373
colorScheme="primary"
74-
leftIcon={<Icon as={FiPlus} />}
74+
leftIcon={<PlusIcon className="size-5" />}
7575
{...restButtonProps}
7676
onClick={onOpen}
7777
isDisabled={!address}

0 commit comments

Comments
 (0)