From a7e285a90dc54caf1c5a9f09c41e2e65ab19f924 Mon Sep 17 00:00:00 2001 From: kien-ngo Date: Thu, 3 Oct 2024 20:29:56 +0000 Subject: [PATCH] [Dashboard] Remove react-icons (5) (#4904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR focuses on replacing icon imports from `react-icons` with `lucide-react` icons across various components in the dashboard application, enhancing the visual consistency and potentially improving performance. ### Detailed summary - Replaced `FiEye` with `EyeIcon` in `reveal-button.tsx`. - Replaced `FiCopy` with `CopyIcon` in `LatestEvents.tsx`. - Replaced `BsLightningCharge` with `ZapIcon` in `GeneralCta.tsx`. - Replaced `FiCheck` with `CheckIcon` in `address-input.tsx`. - Replaced `FaXTwitter` with `XIcon` and `SiOpensea` with `OpenseaIcon` in `OpCreditsGrantedModal.tsx`. - Replaced `FiX` with `XIcon` and caret icons with `ChevronDownIcon`, `ChevronUpIcon` in `phase.tsx`. - Replaced `FiPlay` with `PlayIcon` and `FaCircleInfo` with `InfoIcon` in `interactive-abi-function.tsx`. - Replaced `FiInfo` with `InfoIcon` in `list-form.tsx`. - Replaced navigation icons in `accounts-table.tsx` with `Chevron` icons from `lucide-react`. - Added `OpenseaIcon` component in `OpenseaIcon.tsx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../interactive-abi-function.tsx | 8 +++---- .../icons/brand-icons/OpenseaIcon.tsx | 18 +++++++++++++++ .../onboarding/OpCreditsGrantedModal.tsx | 9 ++++---- .../src/components/shared/GeneralCta.tsx | 15 +++---------- .../solidity-inputs/address-input.tsx | 6 ++--- .../accounts/components/accounts-table.tsx | 22 +++++++++---------- .../claim-conditions-form/phase.tsx | 16 +++++++------- .../tabs/listings/components/list-form.tsx | 18 +++------------ .../tabs/nfts/components/reveal-button.tsx | 6 ++--- .../tabs/overview/components/LatestEvents.tsx | 5 ++--- 10 files changed, 58 insertions(+), 65 deletions(-) create mode 100644 apps/dashboard/src/components/icons/brand-icons/OpenseaIcon.tsx diff --git a/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx b/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx index 81c3293757e..61e45af5cce 100644 --- a/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx +++ b/apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx @@ -7,7 +7,6 @@ import { Divider, Flex, FormControl, - Icon, Input, } from "@chakra-ui/react"; import { useMutation } from "@tanstack/react-query"; @@ -16,10 +15,9 @@ import { TransactionButton } from "components/buttons/TransactionButton"; import { SolidityInput } from "contract-ui/components/solidity-inputs"; import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers"; import { replaceIpfsUrl } from "lib/sdk"; +import { InfoIcon, PlayIcon } from "lucide-react"; import { useEffect, useId, useMemo, useState } from "react"; import { FormProvider, useFieldArray, useForm } from "react-hook-form"; -import { FaCircleInfo } from "react-icons/fa6"; -import { FiPlay } from "react-icons/fi"; import { toast } from "sonner"; import { type ThirdwebContract, @@ -446,7 +444,7 @@ export const InteractiveAbiFunction: React.FC = ({ {isView ? ( diff --git a/apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx b/apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx index 79b9017ffb6..87de826190c 100644 --- a/apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx +++ b/apps/dashboard/src/contract-ui/tabs/listings/components/list-form.tsx @@ -6,7 +6,6 @@ import { Box, Flex, FormControl, - Icon, Input, Select, Spinner, @@ -21,10 +20,9 @@ import { isAlchemySupported } from "lib/wallet/nfts/alchemy"; import { isMoralisSupported } from "lib/wallet/nfts/moralis"; import { isSimpleHashSupported } from "lib/wallet/nfts/simpleHash"; import type { WalletNFT } from "lib/wallet/nfts/types"; -import { CircleAlertIcon } from "lucide-react"; +import { CircleAlertIcon, InfoIcon } from "lucide-react"; import { useMemo } from "react"; import { useForm } from "react-hook-form"; -import { FiInfo } from "react-icons/fi"; import { toast } from "sonner"; import { NATIVE_TOKEN_ADDRESS, @@ -366,12 +364,7 @@ export const CreateListingsForm: React.FC = ({ {!isSupportedChain ? (
- + This chain is not supported by our NFT API yet, please enter the contract address of the NFT you want to list. @@ -462,12 +455,7 @@ export const CreateListingsForm: React.FC = ({ ) : nfts && nfts.length === 0 ? (
- + There are no NFTs owned by this wallet. You need NFTs to create a listing. You can create NFTs with thirdweb.{" "} diff --git a/apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-button.tsx b/apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-button.tsx index 36cd55aa964..76b596a48ac 100644 --- a/apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-button.tsx +++ b/apps/dashboard/src/contract-ui/tabs/nfts/components/reveal-button.tsx @@ -1,8 +1,8 @@ "use client"; import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only"; -import { Icon, useDisclosure } from "@chakra-ui/react"; -import { FiEye } from "react-icons/fi"; +import { useDisclosure } from "@chakra-ui/react"; +import { EyeIcon } from "lucide-react"; import type { ThirdwebContract } from "thirdweb"; import { getBatchesToReveal } from "thirdweb/extensions/erc721"; import { useReadContract } from "thirdweb/react"; @@ -36,7 +36,7 @@ export const NFTRevealButton: React.FC = ({