Skip to content

Commit cf24ca7

Browse files
committed
Dashboard: Migrate marketplace contract pages from chakra to tailwind
1 parent c7fab9f commit cf24ca7

File tree

11 files changed

+888
-912
lines changed

11 files changed

+888
-912
lines changed

apps/dashboard/src/@/actions/getWalletNFTs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export async function getWalletNFTs(params: {
9898
type OwnedNFTInsightResponse = {
9999
name: string;
100100
description: string;
101-
image_url: string;
101+
image_url?: string;
102102
background_color: string;
103103
external_url: string;
104104
metadata_url: string;
@@ -186,7 +186,7 @@ async function getWalletNFTsFromInsight(params: {
186186
description: nft.description,
187187
external_url: nft.external_url,
188188
image: isDev
189-
? nft.image_url.replace("ipfscdn.io/", "thirdwebstorage-dev.com/")
189+
? nft.image_url?.replace("ipfscdn.io/", "thirdwebstorage-dev.com/")
190190
: nft.image_url,
191191
name: nft.name,
192192
uri: isDev

apps/dashboard/src/@/components/blocks/CurrencySelector.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ArrowLeftIcon } from "lucide-react";
12
import { useMemo, useState } from "react";
23
import { isAddress, NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from "thirdweb";
34
import { Button } from "@/components/ui/button";
@@ -109,10 +110,10 @@ export function CurrencySelector({
109110
className="rounded-r-none rounded-l-md"
110111
onClick={() => setIsAddingCurrency(false)}
111112
>
112-
<-
113+
<ArrowLeftIcon className="size-4" />
113114
</Button>
114115
<Input
115-
className="w-full rounded-none"
116+
className={cn("w-full rounded-none", className)}
116117
onChange={(e) => setEditCustomCurrency(e.target.value)}
117118
placeholder="ERC20 Address"
118119
required
@@ -156,7 +157,7 @@ export function CurrencySelector({
156157
: value?.toLowerCase()
157158
}
158159
>
159-
<SelectTrigger>
160+
<SelectTrigger className={className}>
160161
<SelectValue placeholder="Select Currency" />
161162
</SelectTrigger>
162163
<SelectContent>

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,27 @@ export const CancelTab: React.FC<CancelTabProps> = ({
2323
: cancelListing({ contract, listingId: BigInt(id) });
2424
const cancelQuery = useSendAndConfirmTransaction();
2525
return (
26-
<div className="flex flex-col gap-3 pt-3">
27-
<TransactionButton
28-
className="self-end"
29-
client={contract.client}
30-
isLoggedIn={isLoggedIn}
31-
isPending={cancelQuery.isPending}
32-
onClick={() => {
33-
const promise = cancelQuery.mutateAsync(transaction, {
34-
onError: (error) => {
35-
console.error(error);
36-
},
37-
});
38-
toast.promise(promise, {
39-
error: "Failed to cancel",
40-
loading: `Cancelling ${isAuction ? "auction" : "listing"}`,
41-
success: "Item cancelled successfully",
42-
});
43-
}}
44-
transactionCount={1}
45-
txChainID={contract.chain.id}
46-
>
47-
Cancel {isAuction ? "Auction" : "Listing"}
48-
</TransactionButton>
49-
</div>
26+
<TransactionButton
27+
className="self-end"
28+
client={contract.client}
29+
isLoggedIn={isLoggedIn}
30+
isPending={cancelQuery.isPending}
31+
onClick={() => {
32+
const promise = cancelQuery.mutateAsync(transaction, {
33+
onError: (error) => {
34+
console.error(error);
35+
},
36+
});
37+
toast.promise(promise, {
38+
error: "Failed to cancel",
39+
loading: `Cancelling ${isAuction ? "auction" : "listing"}`,
40+
success: "Item cancelled successfully",
41+
});
42+
}}
43+
transactionCount={1}
44+
txChainID={contract.chain.id}
45+
>
46+
Cancel {isAuction ? "Auction" : "Listing"}
47+
</TransactionButton>
5048
);
5149
};

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
5151
<ListerOnly contract={contract}>
5252
<Sheet onOpenChange={setOpen} open={open}>
5353
<SheetTrigger asChild>
54-
<Button variant="primary" {...restButtonProps} disabled={!address}>
55-
{createText} <PlusIcon className="ml-2 size-5" />
54+
<Button
55+
{...restButtonProps}
56+
disabled={!address}
57+
className="gap-2"
58+
size="sm"
59+
>
60+
<PlusIcon className="size-4" />
61+
{createText}
5662
</Button>
5763
</SheetTrigger>
5864
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">

0 commit comments

Comments
 (0)