Skip to content

Commit ebf94a6

Browse files
committed
[Dashboard] Remove tw-components stuff (1) (#5540)
part of DASH-388
1 parent 57fa96b commit ebf94a6

File tree

14 files changed

+65
-83
lines changed

14 files changed

+65
-83
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/Inputs/ClaimerSelection.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { Button } from "@/components/ui/button";
12
import { Box, Flex, Select } from "@chakra-ui/react";
23
import { UploadIcon } from "lucide-react";
3-
import { Button, Text } from "tw-components";
44
import { useClaimConditionsFormContext } from "..";
55
import { CustomFormControl } from "../common";
66

@@ -115,13 +115,13 @@ export const ClaimerSelection = () => {
115115
>
116116
{/* disable the "Edit" button when form is disabled, but not when it's a "See" button */}
117117
<Button
118-
colorScheme="purple"
119-
isDisabled={disabledSnapshotButton}
120-
borderRadius="md"
118+
variant="primary"
119+
disabled={disabledSnapshotButton}
120+
className="gap-2 rounded-md"
121121
onClick={() => setOpenIndex(phaseIndex)}
122-
rightIcon={<UploadIcon className="size-4" />}
123122
>
124123
{isAdmin ? "Edit" : "See"} Claimer Snapshot
124+
<UploadIcon className="size-4" />
125125
</Button>
126126

127127
<Flex
@@ -136,14 +136,14 @@ export const ClaimerSelection = () => {
136136
}}
137137
ml={2}
138138
>
139-
<Text size="body.sm" color="inherit">
139+
<p>
140140
{" "}
141141
<strong>
142142
{field.snapshot?.length} address
143143
{field.snapshot?.length === 1 ? "" : "es"}
144144
</strong>{" "}
145145
in snapshot
146-
</Text>
146+
</p>
147147
</Flex>
148148
</Flex>
149149
) : (

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import { useWalletNFTs } from "@3rdweb-sdk/react";
44
import type { ThirdwebContract } from "thirdweb";
5-
import { Text } from "tw-components";
65
import { NFTCards } from "../../_components/NFTCards";
76

87
interface NftsOwnedProps {
@@ -35,8 +34,8 @@ export const NftsOwned: React.FC<NftsOwnedProps> = ({ contract }) => {
3534
trackingCategory="account_nfts_owned"
3635
/>
3736
) : isWalletNFTsLoading ? null : error ? (
38-
<Text>Failed to fetch NFTs for this account: {error}</Text>
37+
<p>Failed to fetch NFTs for this account: {error}</p>
3938
) : (
40-
<Text>This account doesn&apos;t own any NFTs.</Text>
39+
<p>This account doesn&apos;t own any NFTs.</p>
4140
);
4241
};

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx

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

3+
import { Button } from "@/components/ui/button";
4+
import { Card } from "@/components/ui/card";
35
import { Tooltip } from "@chakra-ui/react";
46
import { TransactionButton } from "components/buttons/TransactionButton";
57
import type { ThirdwebContract } from "thirdweb";
@@ -9,7 +11,6 @@ import {
911
useReadContract,
1012
useSendAndConfirmTransaction,
1113
} from "thirdweb/react";
12-
import { Button, Card, Text } from "tw-components";
1314

1415
interface CreateAccountButtonProps {
1516
contract: ThirdwebContract;
@@ -51,8 +52,8 @@ export const CreateAccountButton: React.FC<CreateAccountButtonProps> = ({
5152
return (
5253
<Tooltip
5354
label={
54-
<Card py={2} px={4} bgColor="backgroundHighlight">
55-
<Text>You can only initialize one account per EOA.</Text>
55+
<Card className="bg-card px-4 py-2">
56+
<p>You can only initialize one account per EOA.</p>
5657
</Card>
5758
}
5859
bg="transparent"
@@ -62,7 +63,7 @@ export const CreateAccountButton: React.FC<CreateAccountButtonProps> = ({
6263
placement="right"
6364
shouldWrapChildren
6465
>
65-
<Button colorScheme="primary" isDisabled>
66+
<Button variant="primary" disabled>
6667
Account Created
6768
</Button>
6869
</Tooltip>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx

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

3+
import { Button } from "@/components/ui/button";
34
import {
45
Sheet,
56
SheetContent,
@@ -18,7 +19,6 @@ import type { ThirdwebContract } from "thirdweb";
1819
import { multicall } from "thirdweb/extensions/common";
1920
import { balanceOf, encodeSafeTransferFrom } from "thirdweb/extensions/erc1155";
2021
import { useActiveAccount, useSendAndConfirmTransaction } from "thirdweb/react";
21-
import { Button, Text } from "tw-components";
2222
import {
2323
type AirdropAddressInput,
2424
AirdropUpload,
@@ -118,12 +118,8 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
118118
<Flex direction={{ base: "column", md: "row" }} gap={4}>
119119
<Sheet open={open} onOpenChange={setOpen}>
120120
<SheetTrigger asChild>
121-
<Button
122-
colorScheme="primary"
123-
borderRadius="md"
124-
rightIcon={<UploadIcon className="size-5" />}
125-
>
126-
Upload addresses
121+
<Button variant="primary" className="rounded-md">
122+
Upload addresses <UploadIcon className="mr-2 size-5" />
127123
</Button>
128124
</SheetTrigger>
129125
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">
@@ -149,18 +145,18 @@ const AirdropTab: React.FC<AirdropTabProps> = ({ contract, tokenId }) => {
149145
color={addresses.length === 0 ? "orange.500" : "green.500"}
150146
>
151147
{addresses.length > 0 && (
152-
<Text size="body.sm" color="inherit">
148+
<p>
153149
<strong>{addresses.length} addresses</strong> ready to be
154150
airdropped
155-
</Text>
151+
</p>
156152
)}
157153
</Flex>
158154
</Flex>
159155
</div>
160-
<Text>
156+
<p>
161157
You can airdrop to a maximum of 250 addresses at a time. If you have
162158
more, please do it in multiple transactions.
163-
</Text>
159+
</p>
164160
<TransactionButton
165161
txChainID={contract.chain.id}
166162
transactionCount={1}

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import type { ThirdwebContract } from "thirdweb";
2727
import { getNFT as getErc721NFT } from "thirdweb/extensions/erc721";
2828
import { getNFT as getErc1155NFT } from "thirdweb/extensions/erc1155";
2929
import { useReadContract } from "thirdweb/react";
30-
import {} from "tw-components";
31-
import { Button, Card, Heading, Text } from "tw-components";
30+
import { Button, Card } from "tw-components";
3231
import { NFTMediaWithEmptyState } from "tw-components/nft-media";
3332
import { shortenString } from "utils/usedapp-external";
3433
import { NftProperty } from "../components/nft-property";
@@ -104,10 +103,10 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
104103

105104
if (!nft) {
106105
return (
107-
<Text>
106+
<p>
108107
No NFT found with token ID {tokenId}. Please check the token ID and try
109108
again.
110-
</Text>
109+
</p>
111110
);
112111
}
113112

@@ -182,7 +181,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
182181
label={
183182
tb.isDisabled ? (
184183
<Card py={2} px={4} bgColor="backgroundHighlight">
185-
<Text size="label.sm">{tb.disabledText}</Text>
184+
<p>{tb.disabledText}</p>
186185
</Card>
187186
) : (
188187
""
@@ -214,7 +213,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
214213
<Card as={Flex} flexDir="column" gap={3}>
215214
<SimpleGrid rowGap={3} columns={12} placeItems="center left">
216215
<GridItem colSpan={4}>
217-
<Heading size="label.md">Token ID</Heading>
216+
<p className="font-semibold">Token ID</p>
218217
</GridItem>
219218
<GridItem colSpan={8}>
220219
<CopyTextButton
@@ -228,31 +227,29 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
228227
{nft.owner && (
229228
<>
230229
<GridItem colSpan={4}>
231-
<Heading size="label.md">Owner</Heading>
230+
<p className="font-semibold">Owner</p>
232231
</GridItem>
233232
<GridItem colSpan={8}>
234233
<WalletAddress address={nft.owner} />
235234
</GridItem>
236235
</>
237236
)}
238237
<GridItem colSpan={4}>
239-
<Heading size="label.md">Token Standard</Heading>
238+
<p className="font-semibold">Token Standard</p>
240239
</GridItem>
241240
<GridItem colSpan={8}>{nft.type}</GridItem>
242241
{nft.type !== "ERC721" && (
243242
<>
244243
<GridItem colSpan={4}>
245-
<Heading size="label.md">Supply</Heading>
244+
<p className="font-semibold">Supply</p>
246245
</GridItem>
247246
<GridItem colSpan={8}>
248-
<Text fontFamily="mono" size="body.md">
249-
{nft.supply.toString()}
250-
</Text>
247+
<p>{nft.supply.toLocaleString("en-US")}</p>
251248
</GridItem>
252249
</>
253250
)}
254251
<GridItem colSpan={4}>
255-
<Heading size="label.md">Token URI</Heading>
252+
<p className="font-semibold">Token URI</p>
256253
</GridItem>
257254
<GridItem
258255
colSpan={8}
@@ -275,7 +272,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
275272
{nft.metadata.image && (
276273
<>
277274
<GridItem colSpan={4}>
278-
<Heading size="label.md">Media URI</Heading>
275+
<p className="font-semibold">Media URI</p>
279276
</GridItem>
280277
<GridItem
281278
colSpan={8}
@@ -301,7 +298,7 @@ export const TokenIdPage: React.FC<TokenIdPageProps> = ({
301298
</Card>
302299
{properties ? (
303300
<Card as={Flex} flexDir="column" gap={4}>
304-
<Heading size="label.md">Attributes</Heading>
301+
<p className="font-semibold">Attributes</p>
305302
{Array.isArray(properties) &&
306303
String(properties[0]?.value) !== "undefined" ? (
307304
<SimpleGrid columns={{ base: 2, md: 4 }} gap={2}>

apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(instance)/[engineId]/configuration/components/system.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
useEngineSystemHealth,
44
useEngineSystemMetrics,
55
} from "@3rdweb-sdk/react/hooks/useEngine";
6-
import { Text } from "tw-components";
76

87
interface EngineSystemProps {
98
instance: EngineInstance;
@@ -17,14 +16,14 @@ export const EngineSystem: React.FC<EngineSystemProps> = ({ instance }) => {
1716
}
1817

1918
return (
20-
<Text fontSize="x-small" fontFamily="mono" opacity={0.5} gap={0}>
19+
<p className="gap-0 font-mono text-xs opacity-50">
2120
Version: {healthQuery.data.engineVersion ?? "..."}
2221
<br />
2322
Enabled: {healthQuery.data.features?.join(", ")}
2423
<br />
2524
CPU: {metricsQuery.data?.data?.cpu?.toFixed(2) ?? "..."}%
2625
<br />
2726
Memory: {metricsQuery.data?.data?.memory?.toFixed(0) ?? "..."}MB
28-
</Text>
27+
</p>
2928
);
3029
};

apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsExplorer.tsx

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

3-
import {} from "@/components/ui/dropdown-menu";
4-
import {} from "@/components/ui/select";
53
import { Layers3 } from "lucide-react";
64
import Link from "next/link";
75

apps/dashboard/src/components/contract-components/shared/sources-accordion.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
AccordionPanel,
88
} from "@chakra-ui/react";
99
import type { Abi } from "abitype";
10-
import { Heading } from "tw-components";
1110
import type { SourceFile } from "../types";
1211

1312
interface SourcesAccordionProps {
@@ -33,7 +32,7 @@ export const SourcesAccordion: React.FC<SourcesAccordionProps> = ({
3332
{({ isExpanded }) => (
3433
<>
3534
<AccordionButton justifyContent="space-between" py={2}>
36-
<Heading size="label.md">ABI</Heading>
35+
<p className="font-semibold">ABI</p>
3736
<AccordionIcon />
3837
</AccordionButton>
3938
<AccordionPanel>
@@ -58,7 +57,7 @@ export const SourcesAccordion: React.FC<SourcesAccordionProps> = ({
5857
{({ isExpanded }) => (
5958
<>
6059
<AccordionButton justifyContent="space-between" py={2}>
61-
<Heading size="label.md">{signature.filename}</Heading>
60+
<p className="font-semibold">{signature.filename}</p>
6261
<AccordionIcon />
6362
</AccordionButton>
6463
<AccordionPanel>

apps/dashboard/src/components/devRelEvents/AmbassadorCards.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Flex } from "@chakra-ui/react";
22
import { ChakraNextImage } from "components/Image";
33
import type { StaticImageData } from "next/image";
4-
import { Text } from "tw-components";
54
import type { ComponentWithChildren } from "types/component-with-children";
65

76
interface AmbassadorProps {
@@ -41,7 +40,7 @@ export const AmbassadorCard: ComponentWithChildren<AmbassadorProps> = ({
4140
lineHeight={1.6}
4241
textAlign="center"
4342
>
44-
<Text size="body.lg">{children}</Text>
43+
<p>{children}</p>
4544
</Flex>
4645
</Flex>
4746
);

apps/dashboard/src/core-ui/batch-upload/batch-table.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
import { useMemo } from "react";
2929
import { type Column, usePagination, useTable } from "react-table";
3030
import type { NFTInput } from "thirdweb/utils";
31-
import { Text } from "tw-components";
3231

3332
const FileImage: React.FC<ImageProps> = ({ src, ...props }) => {
3433
const img = useImageFileOrUrl(
@@ -174,9 +173,9 @@ export const BatchTable: React.FC<BatchTableProps> = ({
174173
{headerGroup.headers.map((column, i) => (
175174
// biome-ignore lint/suspicious/noArrayIndexKey: FIXME
176175
<Th {...column.getHeaderProps()} border="none" key={i}>
177-
<Text as="label" size="label.sm" color="faded">
176+
<p className="text-muted-foreground">
178177
{column.render("Header")}
179-
</Text>
178+
</p>
180179
</Th>
181180
))}
182181
</Tr>
@@ -227,10 +226,10 @@ export const BatchTable: React.FC<BatchTableProps> = ({
227226
icon={<ChevronLeftIcon className="size-4" />}
228227
onClick={() => previousPage()}
229228
/>
230-
<Text whiteSpace="nowrap">
229+
<p className="whitespace-nowrap">
231230
Page <strong>{pageIndex + 1}</strong> of{" "}
232231
<strong>{pageOptions.length}</strong>
233-
</Text>
232+
</p>
234233
<IconButton
235234
isDisabled={!canNextPage}
236235
aria-label="next page"

0 commit comments

Comments
 (0)