From ba9a7d41487a1880d3dba19c512b75903ed32d0a Mon Sep 17 00:00:00 2001 From: kien-ngo Date: Thu, 10 Oct 2024 14:50:37 +0000 Subject: [PATCH] [Dashboard] Remove react-icons (2) (#4983) 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 updating icon imports from `react-icons` to `lucide-react` across several components, enhancing consistency and potentially reducing bundle size. ### Detailed summary - Replaced `FiMenu` with `MenuIcon` in `MobileMenu.tsx`. - Replaced `FiSearch` with `SearchIcon` in `HackathonFooter.tsx`. - Replaced `FiArrowRight` with `MoveRightIcon` in `TWQueryTable.tsx`. - Replaced `BsFillLightningChargeFill` with `ZapIcon` in `HomePageCard.tsx` and `HeroSection.tsx`. - Replaced `BsShieldCheck` with `ShieldCheckIcon` in `PublishedContract`. - Replaced `FiArrowRight` and `FaEllipsisVertical` with `MoveRightIcon` and `EllipsisVerticalIcon` in `TWTable.tsx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../contract-components/published-contract/index.tsx | 4 ++-- .../dashboard/src/components/hackathon/HackathonFooter.tsx | 7 +++---- .../src/components/homepage/sections/HeroSection.tsx | 6 +++--- .../src/components/homepage/sections/HomePageCard.tsx | 6 +++--- .../src/components/product-pages/common/nav/MobileMenu.tsx | 4 ++-- apps/dashboard/src/components/shared/TWQueryTable.tsx | 5 ++--- apps/dashboard/src/components/shared/TWTable.tsx | 7 +++---- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/apps/dashboard/src/components/contract-components/published-contract/index.tsx b/apps/dashboard/src/components/contract-components/published-contract/index.tsx index efe07efe99e..816cb424913 100644 --- a/apps/dashboard/src/components/contract-components/published-contract/index.tsx +++ b/apps/dashboard/src/components/contract-components/published-contract/index.tsx @@ -14,9 +14,9 @@ import { ContractFunctionsOverview } from "components/contract-functions/contrac import { format } from "date-fns/format"; import { correctAndUniqueLicenses } from "lib/licenses"; import { replaceIpfsUrl } from "lib/sdk"; +import { ShieldCheckIcon } from "lucide-react"; import { useMemo } from "react"; import { BiPencil } from "react-icons/bi"; -import { BsShieldCheck } from "react-icons/bs"; import { VscBook, VscCalendar, VscServer } from "react-icons/vsc"; import type { ThirdwebClient } from "thirdweb"; import { useActiveAccount } from "thirdweb/react"; @@ -181,7 +181,7 @@ export const PublishedContract: React.FC = ({ {publishedContract?.audit && ( - + Audit Report diff --git a/apps/dashboard/src/components/hackathon/HackathonFooter.tsx b/apps/dashboard/src/components/hackathon/HackathonFooter.tsx index 19e18f1a22b..b4368740455 100644 --- a/apps/dashboard/src/components/hackathon/HackathonFooter.tsx +++ b/apps/dashboard/src/components/hackathon/HackathonFooter.tsx @@ -1,8 +1,7 @@ -import { Flex, Icon } from "@chakra-ui/react"; +import { Flex } from "@chakra-ui/react"; import { ChakraNextImage } from "components/Image"; import { useTrack } from "hooks/analytics/useTrack"; -import { WandIcon } from "lucide-react"; -import { FiSearch } from "react-icons/fi"; +import { SearchIcon, WandIcon } from "lucide-react"; import { Heading, LinkButton } from "tw-components"; interface HackathonFooterProps { @@ -81,7 +80,7 @@ export const HackathonFooter = ({ h="68px" w={{ base: "90%", md: 80 }} fontSize="20px" - leftIcon={} + leftIcon={} color="black" flexShrink={0} background="rgba(255,255,255,1)" diff --git a/apps/dashboard/src/components/homepage/sections/HeroSection.tsx b/apps/dashboard/src/components/homepage/sections/HeroSection.tsx index e766c698d0d..34db3393790 100644 --- a/apps/dashboard/src/components/homepage/sections/HeroSection.tsx +++ b/apps/dashboard/src/components/homepage/sections/HeroSection.tsx @@ -1,8 +1,8 @@ -import { Flex, Icon, SimpleGrid } from "@chakra-ui/react"; +import { Flex, SimpleGrid } from "@chakra-ui/react"; import { ChakraNextImage } from "components/Image"; import { HomepageSection } from "components/product-pages/homepage/HomepageSection"; +import { ZapIcon } from "lucide-react"; import { useEffect, useState } from "react"; -import { BsFillLightningChargeFill } from "react-icons/bs"; import { Heading, Text, TrackedLink, TrackedLinkButton } from "tw-components"; import { getCookie } from "../../../stores/SyncStoreToCookies"; import { Aurora } from "../Aurora"; @@ -153,7 +153,7 @@ function GetStartedButtonLink(props: { return ( } + leftIcon={} py={6} px={8} w="full" diff --git a/apps/dashboard/src/components/homepage/sections/HomePageCard.tsx b/apps/dashboard/src/components/homepage/sections/HomePageCard.tsx index 44b4b144f88..625053c3b43 100644 --- a/apps/dashboard/src/components/homepage/sections/HomePageCard.tsx +++ b/apps/dashboard/src/components/homepage/sections/HomePageCard.tsx @@ -1,9 +1,9 @@ -import { Container, Flex, Icon, SimpleGrid } from "@chakra-ui/react"; +import { Container, Flex, SimpleGrid } from "@chakra-ui/react"; import { ChakraNextImage } from "components/Image"; import { LandingDesktopMobileImage } from "components/landing-pages/desktop-mobile-image"; +import { ZapIcon } from "lucide-react"; import type { StaticImageData } from "next/image"; import type { ReactNode } from "react"; -import { BsFillLightningChargeFill } from "react-icons/bs"; import { Heading, Text, TrackedLinkButton } from "tw-components"; interface HomePageCardProps { @@ -96,7 +96,7 @@ const HomePageCard = ({ label={label} fontWeight="bold" maxW="190px" - leftIcon={} + leftIcon={} > {ctaText} diff --git a/apps/dashboard/src/components/product-pages/common/nav/MobileMenu.tsx b/apps/dashboard/src/components/product-pages/common/nav/MobileMenu.tsx index 76db90e47a3..16c465033f8 100644 --- a/apps/dashboard/src/components/product-pages/common/nav/MobileMenu.tsx +++ b/apps/dashboard/src/components/product-pages/common/nav/MobileMenu.tsx @@ -5,7 +5,7 @@ import { useDisclosure, } from "@chakra-ui/react"; import { ChakraNextImage } from "components/Image"; -import { FiMenu } from "react-icons/fi"; +import { MenuIcon } from "lucide-react"; import { Drawer, Heading, TrackedLink, TrackedLinkButton } from "tw-components"; import { DEVELOPER_RESOURCES, @@ -35,7 +35,7 @@ export const MobileMenu: React.FC = (props) => { } + icon={} variant="ghost" onClick={disclosure.onOpen} /> diff --git a/apps/dashboard/src/components/shared/TWQueryTable.tsx b/apps/dashboard/src/components/shared/TWQueryTable.tsx index 6c1a0df1151..bc04021e4e6 100644 --- a/apps/dashboard/src/components/shared/TWQueryTable.tsx +++ b/apps/dashboard/src/components/shared/TWQueryTable.tsx @@ -3,7 +3,6 @@ import { ButtonGroup, Flex, GridItem, - Icon, Select, SimpleGrid, Skeleton, @@ -22,9 +21,9 @@ import { getCoreRowModel, useReactTable, } from "@tanstack/react-table"; +import { MoveRightIcon } from "lucide-react"; import pluralize from "pluralize"; import { type SetStateAction, useMemo } from "react"; -import { FiArrowRight } from "react-icons/fi"; import { Button, TableContainer, Text } from "tw-components"; type TWQueryTableProps = { @@ -122,7 +121,7 @@ export function TWQueryTable( borderBottomWidth="inherit" borderBottomColor="hsl(var(--border))" > - + )} diff --git a/apps/dashboard/src/components/shared/TWTable.tsx b/apps/dashboard/src/components/shared/TWTable.tsx index 36eea21f17f..e0facb95c0b 100644 --- a/apps/dashboard/src/components/shared/TWTable.tsx +++ b/apps/dashboard/src/components/shared/TWTable.tsx @@ -27,10 +27,9 @@ import { getCoreRowModel, useReactTable, } from "@tanstack/react-table"; +import { EllipsisVerticalIcon, MoveRightIcon } from "lucide-react"; import pluralize from "pluralize"; import { type SetStateAction, useMemo, useState } from "react"; -import { FaEllipsisVertical } from "react-icons/fa6"; -import { FiArrowRight } from "react-icons/fi"; import type { IconType } from "react-icons/lib"; type CtaMenuItem = { @@ -191,7 +190,7 @@ export function TWTable(tableProps: TWTableProps) { {/* Show a ... menu or individual CTA buttons. */} {tableProps.onRowClick ? ( - + ) : tableProps.onMenuClick ? ( @@ -202,7 +201,7 @@ export function TWTable(tableProps: TWTableProps) { aria-label="Actions" className="!h-auto relative z-10 p-2.5" > - +