Skip to content

Commit ba9a7d4

Browse files
committed
[Dashboard] Remove react-icons (2) (#4983)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## 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}` <!-- end pr-codex -->
1 parent c776943 commit ba9a7d4

File tree

7 files changed

+18
-21
lines changed

7 files changed

+18
-21
lines changed

apps/dashboard/src/components/contract-components/published-contract/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import { ContractFunctionsOverview } from "components/contract-functions/contrac
1414
import { format } from "date-fns/format";
1515
import { correctAndUniqueLicenses } from "lib/licenses";
1616
import { replaceIpfsUrl } from "lib/sdk";
17+
import { ShieldCheckIcon } from "lucide-react";
1718
import { useMemo } from "react";
1819
import { BiPencil } from "react-icons/bi";
19-
import { BsShieldCheck } from "react-icons/bs";
2020
import { VscBook, VscCalendar, VscServer } from "react-icons/vsc";
2121
import type { ThirdwebClient } from "thirdweb";
2222
import { useActiveAccount } from "thirdweb/react";
@@ -181,7 +181,7 @@ export const PublishedContract: React.FC<PublishedContractProps> = ({
181181
{publishedContract?.audit && (
182182
<ListItem>
183183
<Flex gap={2} alignItems="flex-start">
184-
<Icon as={BsShieldCheck} boxSize={5} color="green" />
184+
<ShieldCheckIcon className="size-5 text-green-500" />
185185
<Flex direction="column" gap={1}>
186186
<Heading as="h5" size="label.sm">
187187
Audit Report

apps/dashboard/src/components/hackathon/HackathonFooter.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { Flex, Icon } from "@chakra-ui/react";
1+
import { Flex } from "@chakra-ui/react";
22
import { ChakraNextImage } from "components/Image";
33
import { useTrack } from "hooks/analytics/useTrack";
4-
import { WandIcon } from "lucide-react";
5-
import { FiSearch } from "react-icons/fi";
4+
import { SearchIcon, WandIcon } from "lucide-react";
65
import { Heading, LinkButton } from "tw-components";
76

87
interface HackathonFooterProps {
@@ -81,7 +80,7 @@ export const HackathonFooter = ({
8180
h="68px"
8281
w={{ base: "90%", md: 80 }}
8382
fontSize="20px"
84-
leftIcon={<Icon as={FiSearch} />}
83+
leftIcon={<SearchIcon className="size-5" />}
8584
color="black"
8685
flexShrink={0}
8786
background="rgba(255,255,255,1)"

apps/dashboard/src/components/homepage/sections/HeroSection.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Flex, Icon, SimpleGrid } from "@chakra-ui/react";
1+
import { Flex, SimpleGrid } from "@chakra-ui/react";
22
import { ChakraNextImage } from "components/Image";
33
import { HomepageSection } from "components/product-pages/homepage/HomepageSection";
4+
import { ZapIcon } from "lucide-react";
45
import { useEffect, useState } from "react";
5-
import { BsFillLightningChargeFill } from "react-icons/bs";
66
import { Heading, Text, TrackedLink, TrackedLinkButton } from "tw-components";
77
import { getCookie } from "../../../stores/SyncStoreToCookies";
88
import { Aurora } from "../Aurora";
@@ -153,7 +153,7 @@ function GetStartedButtonLink(props: {
153153

154154
return (
155155
<TrackedLinkButton
156-
leftIcon={<Icon as={BsFillLightningChargeFill} boxSize={4} />}
156+
leftIcon={<ZapIcon className="size-4 fill-black" />}
157157
py={6}
158158
px={8}
159159
w="full"

apps/dashboard/src/components/homepage/sections/HomePageCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Container, Flex, Icon, SimpleGrid } from "@chakra-ui/react";
1+
import { Container, Flex, SimpleGrid } from "@chakra-ui/react";
22
import { ChakraNextImage } from "components/Image";
33
import { LandingDesktopMobileImage } from "components/landing-pages/desktop-mobile-image";
4+
import { ZapIcon } from "lucide-react";
45
import type { StaticImageData } from "next/image";
56
import type { ReactNode } from "react";
6-
import { BsFillLightningChargeFill } from "react-icons/bs";
77
import { Heading, Text, TrackedLinkButton } from "tw-components";
88

99
interface HomePageCardProps {
@@ -96,7 +96,7 @@ const HomePageCard = ({
9696
label={label}
9797
fontWeight="bold"
9898
maxW="190px"
99-
leftIcon={<Icon as={BsFillLightningChargeFill} boxSize={4} />}
99+
leftIcon={<ZapIcon className="size-4 fill-black" />}
100100
>
101101
{ctaText}
102102
</TrackedLinkButton>

apps/dashboard/src/components/product-pages/common/nav/MobileMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
useDisclosure,
66
} from "@chakra-ui/react";
77
import { ChakraNextImage } from "components/Image";
8-
import { FiMenu } from "react-icons/fi";
8+
import { MenuIcon } from "lucide-react";
99
import { Drawer, Heading, TrackedLink, TrackedLinkButton } from "tw-components";
1010
import {
1111
DEVELOPER_RESOURCES,
@@ -35,7 +35,7 @@ export const MobileMenu: React.FC<FlexProps> = (props) => {
3535
</TrackedLinkButton>
3636
<IconButton
3737
aria-label="Homepage Menu"
38-
icon={<FiMenu />}
38+
icon={<MenuIcon className="size-4" />}
3939
variant="ghost"
4040
onClick={disclosure.onOpen}
4141
/>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ButtonGroup,
44
Flex,
55
GridItem,
6-
Icon,
76
Select,
87
SimpleGrid,
98
Skeleton,
@@ -22,9 +21,9 @@ import {
2221
getCoreRowModel,
2322
useReactTable,
2423
} from "@tanstack/react-table";
24+
import { MoveRightIcon } from "lucide-react";
2525
import pluralize from "pluralize";
2626
import { type SetStateAction, useMemo } from "react";
27-
import { FiArrowRight } from "react-icons/fi";
2827
import { Button, TableContainer, Text } from "tw-components";
2928

3029
type TWQueryTableProps<TRowData, TInputData> = {
@@ -122,7 +121,7 @@ export function TWQueryTable<TRowData, TInputData>(
122121
borderBottomWidth="inherit"
123122
borderBottomColor="hsl(var(--border))"
124123
>
125-
<Icon as={FiArrowRight} />
124+
<MoveRightIcon className="size-4" />
126125
</Td>
127126
)}
128127
</Tr>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ import {
2727
getCoreRowModel,
2828
useReactTable,
2929
} from "@tanstack/react-table";
30+
import { EllipsisVerticalIcon, MoveRightIcon } from "lucide-react";
3031
import pluralize from "pluralize";
3132
import { type SetStateAction, useMemo, useState } from "react";
32-
import { FaEllipsisVertical } from "react-icons/fa6";
33-
import { FiArrowRight } from "react-icons/fi";
3433
import type { IconType } from "react-icons/lib";
3534

3635
type CtaMenuItem<TRowData> = {
@@ -191,7 +190,7 @@ export function TWTable<TRowData>(tableProps: TWTableProps<TRowData>) {
191190
{/* Show a ... menu or individual CTA buttons. */}
192191
{tableProps.onRowClick ? (
193192
<TableCell className="text-end">
194-
<FiArrowRight className="size-4" />
193+
<MoveRightIcon className="size-4" />
195194
</TableCell>
196195
) : tableProps.onMenuClick ? (
197196
<TableCell className="text-end">
@@ -202,7 +201,7 @@ export function TWTable<TRowData>(tableProps: TWTableProps<TRowData>) {
202201
aria-label="Actions"
203202
className="!h-auto relative z-10 p-2.5"
204203
>
205-
<FaEllipsisVertical className="size-4" />
204+
<EllipsisVerticalIcon className="size-4" />
206205
</Button>
207206
</DropdownMenuTrigger>
208207
<DropdownMenuContent>

0 commit comments

Comments
 (0)