Skip to content

Commit 5d78149

Browse files
committed
[Dashboard] Remove react-icons (4)
1 parent 298ed24 commit 5d78149

File tree

10 files changed

+70
-89
lines changed

10 files changed

+70
-89
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { cn } from "@/lib/utils";
1515
import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet";
1616
import {
1717
Box,
18-
Icon,
1918
Popover,
2019
PopoverArrow,
2120
PopoverBody,
@@ -34,11 +33,10 @@ import type {
3433
import { getSDKTheme } from "app/components/sdk-component-theme";
3534
import { LOCAL_NODE_PKEY } from "constants/misc";
3635
import { useTrack } from "hooks/analytics/useTrack";
37-
import { ExternalLinkIcon, TriangleAlertIcon } from "lucide-react";
36+
import { ExternalLinkIcon, TriangleAlertIcon, UnplugIcon } from "lucide-react";
3837
import { useTheme } from "next-themes";
3938
import Link from "next/link";
4039
import { forwardRef, useCallback, useMemo, useRef, useState } from "react";
41-
import { VscDebugDisconnect } from "react-icons/vsc";
4240
import { toast } from "sonner";
4341
import { prepareTransaction, sendTransaction, toWei } from "thirdweb";
4442
import { type Chain, type ChainMetadata, localhost } from "thirdweb/chains";
@@ -461,7 +459,7 @@ const MismatchNotice: React.FC<{
461459

462460
<Button
463461
ref={actuallyCanAttemptSwitch ? initialFocusRef : undefined}
464-
leftIcon={<Icon as={VscDebugDisconnect} />}
462+
leftIcon={<UnplugIcon className="size-4" />}
465463
size="sm"
466464
onClick={onSwitchWallet}
467465
isLoading={connectionStatus === "connecting"}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
} from "@chakra-ui/react";
1313
import { CHAIN_ID_TO_GNOSIS } from "constants/mappings";
1414
import { useActiveChainAsDashboardChain } from "lib/v5-adapter";
15+
import { ArrowLeftRightIcon } from "lucide-react";
1516
import { useEffect, useMemo, useRef, useState } from "react";
16-
import { BiTransferAlt } from "react-icons/bi";
1717
import { FiInfo } from "react-icons/fi";
1818
import {
1919
useActiveAccount,
@@ -154,7 +154,7 @@ export const TransactionButton: React.FC<TransactionButtonProps> = ({
154154
<Text color="inherit" size="label.md" fontFamily="mono">
155155
{transactionCount}
156156
</Text>
157-
<BiTransferAlt />
157+
<ArrowLeftRightIcon className="size-3" />
158158
</Flex>
159159
</Center>
160160
</ToolTipLabel>

apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-tab.tsx

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

3-
import { Flex, Icon, useDisclosure } from "@chakra-ui/react";
3+
import { Flex, useDisclosure } from "@chakra-ui/react";
44
import { TransactionButton } from "components/buttons/TransactionButton";
55
import {
66
type AirdropAddressInput,
77
AirdropUpload,
88
} from "contract-ui/tabs/nfts/components/airdrop-upload";
99
import { useTrack } from "hooks/analytics/useTrack";
1010
import { useTxNotifications } from "hooks/useTxNotifications";
11+
import { UploadIcon } from "lucide-react";
1112
import { useForm } from "react-hook-form";
12-
import { BsCircleFill } from "react-icons/bs";
13-
import { FiUpload } from "react-icons/fi";
1413
import type { ThirdwebContract } from "thirdweb";
1514
import { multicall } from "thirdweb/extensions/common";
1615
import { balanceOf, encodeSafeTransferFrom } from "thirdweb/extensions/erc1155";
@@ -125,7 +124,7 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
125124
colorScheme="primary"
126125
borderRadius="md"
127126
onClick={onOpen}
128-
rightIcon={<Icon as={FiUpload} />}
127+
rightIcon={<UploadIcon className="size-5" />}
129128
>
130129
Upload addresses
131130
</Button>
@@ -138,13 +137,10 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
138137
color={addresses.length === 0 ? "orange.500" : "green.500"}
139138
>
140139
{addresses.length > 0 && (
141-
<>
142-
<Icon as={BsCircleFill} boxSize={2} />
143-
<Text size="body.sm" color="inherit">
144-
<strong>{addresses.length} addresses</strong> ready to be
145-
airdropped
146-
</Text>
147-
</>
140+
<Text size="body.sm" color="inherit">
141+
<strong>{addresses.length} addresses</strong> ready to be
142+
airdropped
143+
</Text>
148144
)}
149145
</Flex>
150146
</Flex>

apps/dashboard/src/contract-ui/tabs/nfts/components/airdrop-upload.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,28 +204,33 @@ export const AirdropUpload: React.FC<AirdropUploadProps> = ({
204204
<div className="relative aspect-[21/9] w-full">
205205
<div
206206
className={cn(
207-
"h-full cursor-pointer rounded-md border border-border hover:border-primary",
207+
"flex h-full cursor-pointer rounded-md border border-border hover:border-primary",
208208
noCsv ? "bg-red-200" : "bg-card",
209209
)}
210210
{...getRootProps()}
211211
>
212212
<input {...getInputProps()} />
213-
<div className="flex flex-col p-6">
213+
<div className="m-auto flex flex-col p-6">
214214
<UploadIcon
215215
size={16}
216216
className={cn("mx-auto mb-2 text-gray-500", {
217217
"text-red-500": noCsv,
218218
})}
219219
/>
220220
{isDragActive ? (
221-
<Heading as={Text} size="label.md">
221+
<Heading
222+
as={Text}
223+
size="label.md"
224+
className="text-center"
225+
>
222226
Drop the files here
223227
</Heading>
224228
) : (
225229
<Heading
226230
as={Text}
227231
size="label.md"
228232
color={noCsv ? "red.500" : "gray.600"}
233+
className="text-center"
229234
>
230235
{noCsv
231236
? `No valid CSV file found, make sure your CSV includes the "address" column.`
@@ -439,7 +444,7 @@ const AirdropTable: React.FC<AirdropTableProps> = ({ data, portalRef }) => {
439444
</TableContainer>
440445
<Portal containerRef={portalRef}>
441446
<div className="flex w-full items-center justify-center">
442-
<div className="flex flex-row">
447+
<div className="flex flex-row gap-1">
443448
<IconButton
444449
isDisabled={!canPreviousPage}
445450
aria-label="first page"
@@ -452,10 +457,10 @@ const AirdropTable: React.FC<AirdropTableProps> = ({ data, portalRef }) => {
452457
icon={<ChevronLeftIcon className="size-4" />}
453458
onClick={() => previousPage()}
454459
/>
455-
<Text whiteSpace="nowrap">
460+
<p className="my-auto whitespace-nowrap">
456461
Page <strong>{pageIndex + 1}</strong> of{" "}
457462
<strong>{pageOptions.length}</strong>
458-
</Text>
463+
</p>
459464
<IconButton
460465
isDisabled={!canNextPage}
461466
aria-label="next page"

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

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

33
import { MinterOnly } from "@3rdweb-sdk/react/components/roles/minter-only";
4-
import { Icon, useDisclosure } from "@chakra-ui/react";
4+
import { useDisclosure } from "@chakra-ui/react";
55
import { BatchLazyMint } from "core-ui/batch-upload/batch-lazy-mint";
66
import { useTrack } from "hooks/analytics/useTrack";
77
import { useTxNotifications } from "hooks/useTxNotifications";
8-
import { RiCheckboxMultipleBlankLine } from "react-icons/ri";
8+
import { FileStackIcon } from "lucide-react";
99
import type { ThirdwebContract } from "thirdweb";
1010
import * as ERC721Ext from "thirdweb/extensions/erc721";
1111
import * as ERC1155Ext from "thirdweb/extensions/erc1155";
@@ -120,7 +120,7 @@ export const BatchLazyMintButton: React.FC<BatchLazyMintButtonProps> = ({
120120
</Drawer>
121121
<Button
122122
colorScheme="primary"
123-
leftIcon={<Icon as={RiCheckboxMultipleBlankLine} />}
123+
leftIcon={<FileStackIcon className="size-4" />}
124124
onClick={onOpen}
125125
>
126126
Batch Upload

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { WalletAddress } from "@/components/blocks/wallet-address";
44
import { useDashboardRouter } from "@/lib/DashboardRouter";
55
import {
66
Flex,
7-
Icon,
87
IconButton,
98
Select,
109
Skeleton,
@@ -18,14 +17,14 @@ import {
1817
Tr,
1918
} from "@chakra-ui/react";
2019
import { MediaCell } from "components/contract-pages/table/table-columns/cells/media-cell";
21-
import { useEffect, useMemo, useState } from "react";
22-
import { FiArrowRight } from "react-icons/fi";
2320
import {
24-
MdFirstPage,
25-
MdLastPage,
26-
MdNavigateBefore,
27-
MdNavigateNext,
28-
} from "react-icons/md";
21+
ArrowRightIcon,
22+
ChevronFirstIcon,
23+
ChevronLastIcon,
24+
ChevronLeftIcon,
25+
ChevronRightIcon,
26+
} from "lucide-react";
27+
import { useEffect, useMemo, useState } from "react";
2928
import {
3029
type CellProps,
3130
type Column,
@@ -294,7 +293,7 @@ export const NFTGetAllTable: React.FC<ContractOverviewNFTGetAllProps> = ({
294293
</Td>
295294
))}
296295
<Td borderBottomWidth="inherit" borderColor="borderColor">
297-
{!failedToLoad && <Icon as={FiArrowRight} />}
296+
{!failedToLoad && <ArrowRightIcon className="size-4" />}
298297
</Td>
299298
</Tr>
300299
);
@@ -325,17 +324,17 @@ export const NFTGetAllTable: React.FC<ContractOverviewNFTGetAllProps> = ({
325324
</Table>
326325
</TableContainer>
327326
<div className="flex w-full items-center justify-center">
328-
<Flex gap={2} direction="row" align="center">
327+
<div className="flex flex-row items-center gap-1">
329328
<IconButton
330329
isDisabled={!canPreviousPage || queryLoading}
331330
aria-label="first page"
332-
icon={<Icon as={MdFirstPage} />}
331+
icon={<ChevronFirstIcon className="size-4" />}
333332
onClick={() => gotoPage(0)}
334333
/>
335334
<IconButton
336335
isDisabled={!canPreviousPage || queryLoading}
337336
aria-label="previous page"
338-
icon={<Icon as={MdNavigateBefore} />}
337+
icon={<ChevronLeftIcon className="size-4" />}
339338
onClick={() => previousPage()}
340339
/>
341340
<Text whiteSpace="nowrap">
@@ -347,13 +346,13 @@ export const NFTGetAllTable: React.FC<ContractOverviewNFTGetAllProps> = ({
347346
<IconButton
348347
isDisabled={!canNextPage || queryLoading}
349348
aria-label="next page"
350-
icon={<Icon as={MdNavigateNext} />}
349+
icon={<ChevronRightIcon className="size-4" />}
351350
onClick={() => nextPage()}
352351
/>
353352
<IconButton
354353
isDisabled={!canNextPage || queryLoading}
355354
aria-label="last page"
356-
icon={<Icon as={MdLastPage} />}
355+
icon={<ChevronLastIcon className="size-4" />}
357356
onClick={() => gotoPage(pageCount - 1)}
358357
/>
359358

@@ -370,7 +369,7 @@ export const NFTGetAllTable: React.FC<ContractOverviewNFTGetAllProps> = ({
370369
<option value="250">250</option>
371370
<option value="500">500</option>
372371
</Select>
373-
</Flex>
372+
</div>
374373
</div>
375374
</Flex>
376375
);

apps/dashboard/src/contract-ui/tabs/nfts/components/token-id.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import {
99
Divider,
1010
Flex,
1111
GridItem,
12-
Icon,
1312
IconButton,
1413
SimpleGrid,
1514
Tooltip,
1615
useBreakpointValue,
1716
} from "@chakra-ui/react";
1817
import { useNFTDrawerTabs } from "core-ui/nft-drawer/useNftDrawerTabs";
18+
import { ChevronLeftIcon } from "lucide-react";
1919
import { useState } from "react";
20-
import { IoChevronBack } from "react-icons/io5";
2120
import type { ThirdwebContract } from "thirdweb";
2221
import { getNFT as getErc721NFT } from "thirdweb/extensions/erc721";
2322
import { getNFT as getErc1155NFT } from "thirdweb/extensions/erc1155";
@@ -115,7 +114,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
115114
router.push(`/${chainSlug}/${contract.address}/nfts`)
116115
}
117116
aria-label="Back"
118-
icon={<Icon as={IoChevronBack} boxSize={6} />}
117+
icon={<ChevronLeftIcon className="size-6" />}
119118
>
120119
Back
121120
</IconButton>

apps/dashboard/src/contract-ui/tabs/overview/components/PermissionsTable.tsx

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
import {
2-
Box,
3-
Flex,
4-
Icon,
5-
List,
6-
SimpleGrid,
7-
Tag,
8-
Tooltip,
9-
} from "@chakra-ui/react";
1+
import { ToolTipLabel } from "@/components/ui/tooltip";
2+
import { Box, Flex, List, SimpleGrid, Tag } from "@chakra-ui/react";
103
import { AnimatePresence, motion } from "framer-motion";
114
import { useClipboard } from "hooks/useClipboard";
5+
import { CopyIcon } from "lucide-react";
126
import { useMemo } from "react";
13-
import { FiCopy } from "react-icons/fi";
147
import { toast } from "sonner";
158
import { type ThirdwebContract, ZERO_ADDRESS } from "thirdweb";
169
import { useReadContract } from "thirdweb/react";
@@ -164,16 +157,7 @@ const PermissionsItem: React.FC<PermissionsItemProps> = ({ data }) => {
164157
>
165158
<Box gridColumn="span 2">
166159
<div className="flex flex-row items-center gap-3">
167-
<Tooltip
168-
p={0}
169-
bg="transparent"
170-
boxShadow="none"
171-
label={
172-
<Card py={2} px={4} bgColor="backgroundHighlight">
173-
<Text size="label.sm">Copy address to clipboard</Text>
174-
</Card>
175-
}
176-
>
160+
<ToolTipLabel label="Copy address to clipboard">
177161
<Button
178162
size="sm"
179163
bg="transparent"
@@ -182,9 +166,9 @@ const PermissionsItem: React.FC<PermissionsItemProps> = ({ data }) => {
182166
toast.info("Address copied.");
183167
}}
184168
>
185-
<Icon as={FiCopy} boxSize={3} />
169+
<CopyIcon className="size-3" />
186170
</Button>
187-
</Tooltip>
171+
</ToolTipLabel>
188172
<Text fontFamily="mono" noOfLines={1}>
189173
{shortenIfAddress(data.member)}
190174
</Text>

0 commit comments

Comments
 (0)