Skip to content

Commit ebd5908

Browse files
committed
[Dashboard] Remove non-branding icons (#4810)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on replacing various `react-icons` with `lucide-react` icons across multiple components, along with some minor adjustments to properties and imports. It aims to standardize icon usage within the codebase. ### Detailed summary - Removed `IconType` from multiple interfaces in `types.ts` and `AnimatedCLICommand.tsx`. - Replaced `react-icons` with `lucide-react` icons in `HackathonFooter`, `NFTClaimButton`, and other components. - Updated icon rendering logic in multiple components for consistency. - Adjusted imports and usage of icons in `FileInput`, `BatchLazyMint`, and `MismatchButton`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 21b032d commit ebd5908

File tree

20 files changed

+64
-120
lines changed

20 files changed

+64
-120
lines changed

apps/dashboard/src/components/buttons/MismatchButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
useBreakpointValue,
2626
useDisclosure,
2727
} from "@chakra-ui/react";
28-
import { AiOutlineWarning } from "@react-icons/all-files/ai/AiOutlineWarning";
2928
import { useQuery } from "@tanstack/react-query";
3029
import { FaucetButton } from "app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/FaucetButton";
3130
import { GiftIcon } from "app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/icons/GiftIcon";
@@ -36,7 +35,7 @@ import type {
3635
import { getSDKTheme } from "app/components/sdk-component-theme";
3736
import { LOCAL_NODE_PKEY } from "constants/misc";
3837
import { useTrack } from "hooks/analytics/useTrack";
39-
import { ExternalLinkIcon } from "lucide-react";
38+
import { ExternalLinkIcon, TriangleAlertIcon } from "lucide-react";
4039
import { useTheme } from "next-themes";
4140
import Link from "next/link";
4241
import { forwardRef, useCallback, useMemo, useRef, useState } from "react";
@@ -448,7 +447,7 @@ const MismatchNotice: React.FC<{
448447
<div className="flex flex-col gap-4">
449448
<Heading size="label.lg">
450449
<div className="flex flex-row items-center gap-2">
451-
<Icon boxSize={6} as={AiOutlineWarning} />
450+
<TriangleAlertIcon className="size-6" />
452451
<span>Network Mismatch</span>
453452
</div>
454453
</Heading>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Flex, Icon } from "@chakra-ui/react";
2-
import { ImMagicWand } from "@react-icons/all-files/im/ImMagicWand";
32
import { ChakraNextImage } from "components/Image";
43
import { useTrack } from "hooks/analytics/useTrack";
4+
import { WandIcon } from "lucide-react";
55
import { FiSearch } from "react-icons/fi";
66
import { Heading, LinkButton } from "tw-components";
77

@@ -60,7 +60,7 @@ export const HackathonEarnFooter = ({
6060
h="68px"
6161
w={{ base: "90%", md: 80 }}
6262
fontSize="20px"
63-
leftIcon={<Icon as={ImMagicWand} />}
63+
leftIcon={<WandIcon className="size-6" />}
6464
color="black"
6565
flexShrink={0}
6666
background="rgba(255,255,255,1)"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Flex, Icon } from "@chakra-ui/react";
2-
import { ImMagicWand } from "@react-icons/all-files/im/ImMagicWand";
32
import { ChakraNextImage } from "components/Image";
43
import { useTrack } from "hooks/analytics/useTrack";
4+
import { WandIcon } from "lucide-react";
55
import { FiSearch } from "react-icons/fi";
66
import { Heading, LinkButton } from "tw-components";
77

@@ -56,7 +56,7 @@ export const HackathonFooter = ({
5656
h="68px"
5757
w={{ base: "90%", md: 80 }}
5858
fontSize="20px"
59-
leftIcon={<Icon as={ImMagicWand} />}
59+
leftIcon={<WandIcon className="size-6" />}
6060
color="black"
6161
flexShrink={0}
6262
background="rgba(255,255,255,1)"

apps/dashboard/src/components/hackathon/common/ScheduleSection.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Flex, Icon, LinkBox, LinkOverlay } from "@chakra-ui/react";
2-
import { BiRightArrowAlt } from "@react-icons/all-files/bi/BiRightArrowAlt";
1+
import { Flex, LinkBox, LinkOverlay } from "@chakra-ui/react";
32
import { useTrack } from "hooks/analytics/useTrack";
3+
import { MoveRightIcon } from "lucide-react";
44
import { Badge, Heading, LinkButton, Text } from "tw-components";
55

66
interface ScheduleItem {
@@ -108,14 +108,7 @@ export const ScheduleSection: React.FC<ScheduleSectionProps> = ({
108108
</Flex>
109109
</LinkOverlay>
110110
</Flex>
111-
<Icon
112-
as={BiRightArrowAlt}
113-
boxSize={6}
114-
color="gray.300"
115-
_groupHover={{ color: "#e984f3" }}
116-
display={{ base: "none", md: "block" }}
117-
marginLeft="auto"
118-
/>
111+
<MoveRightIcon className="ml-auto hidden size-4 text-gray-300 md:block" />
119112
</Flex>
120113
))}
121114
</Flex>

apps/dashboard/src/components/homepage/AnimatedCLICommand/AnimatedCLICommand.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ import {
88
useColorModeValue,
99
useTheme,
1010
} from "@chakra-ui/react";
11-
import { IoMdCheckmark } from "@react-icons/all-files/io/IoMdCheckmark";
1211
import { useClipboard } from "hooks/useClipboard";
12+
import { CheckIcon, CopyIcon } from "lucide-react";
1313
import { Highlight, themes } from "prism-react-renderer";
1414
import { useEffect, useRef, useState } from "react";
1515
import { BsLightning } from "react-icons/bs";
16-
import { FiCopy } from "react-icons/fi";
1716
import { useInView } from "react-intersection-observer";
1817
import { Text } from "tw-components";
1918

@@ -162,10 +161,11 @@ export const HomePageCodeBlock: React.FC<CodeBlockProps> = ({
162161
colorScheme="gray"
163162
size="sm"
164163
icon={
165-
<Icon
166-
as={hasCopied ? IoMdCheckmark : FiCopy}
167-
fill={hasCopied ? "green.500" : undefined}
168-
/>
164+
hasCopied ? (
165+
<CheckIcon className="size-4 text-green-500" />
166+
) : (
167+
<CopyIcon className="size-4" />
168+
)
169169
}
170170
/>
171171
)}

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
Flex,
33
type FlexProps,
4-
Icon,
54
IconButton,
65
ListItem,
76
UnorderedList,
@@ -106,17 +105,15 @@ const MobileNavSection: React.FC<MobileNavSectionProps> = ({
106105
size="label.md"
107106
onClick={onItemClick}
108107
>
109-
{link.icon ? (
108+
{link.icon && (
110109
<ChakraNextImage
111110
alt=""
112111
boxSize={5}
113112
src={link.icon}
114113
sizes="40px"
115114
w={5}
116115
/>
117-
) : link.iconType ? (
118-
<Icon as={link.iconType} h={4} w={5} />
119-
) : null}
116+
)}
120117
{link.name}
121118
</Heading>
122119
</ListItem>

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Icon, Stack } from "@chakra-ui/react";
1+
import { Box, Stack } from "@chakra-ui/react";
22
import { ChakraNextImage } from "components/Image";
33
import { Text, TrackedLink } from "tw-components";
44
import type { SectionItemProps, SectionProps } from "./types";
@@ -9,7 +9,6 @@ export const NavCard: React.FC<SectionItemProps | SectionProps> = ({
99
label,
1010
link,
1111
icon,
12-
iconType,
1312
comingSoon,
1413
}) => {
1514
return (
@@ -26,14 +25,6 @@ export const NavCard: React.FC<SectionItemProps | SectionProps> = ({
2625
{icon && (
2726
<ChakraNextImage boxSize={7} mb="-4px" src={icon} alt="icon" />
2827
)}
29-
{iconType && (
30-
<Icon
31-
as={iconType}
32-
color={comingSoon ? "whiteAlpha.400" : "white"}
33-
boxSize={6}
34-
mr={2}
35-
/>
36-
)}
3728
<div className="flex flex-col">
3829
<Text
3930
fontWeight="bold"

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Box, Stack } from "@chakra-ui/react";
2-
import type { IconType } from "@react-icons/all-files";
32
import type { StaticImageData } from "next/image";
43
import { Text } from "tw-components";
54

@@ -8,7 +7,6 @@ interface ProductSectionItemProps {
87
description: string;
98
href?: string;
109
icon?: StaticImageData;
11-
iconType?: IconType;
1210
comingSoon?: boolean;
1311
selected: boolean;
1412
}

apps/dashboard/src/components/product-pages/common/nav/types.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { IconType } from "@react-icons/all-files";
21
import type { StaticImageData } from "next/image";
32

43
export interface SectionProps {
@@ -8,7 +7,6 @@ export interface SectionProps {
87
icon?: StaticImageData;
98
link?: string;
109
section?: "contracts-v2" | "connect-v2" | "engine-v2";
11-
iconType?: IconType;
1210
comingSoon?: boolean;
1311
}
1412

@@ -20,7 +18,6 @@ export interface SectionItemProps {
2018
link: string;
2119
dashboardLink?: string;
2220
icon?: StaticImageData;
23-
iconType?: IconType;
2421
comingSoon?: boolean;
2522
inLandingPage?: boolean;
2623
section:

0 commit comments

Comments
 (0)