diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx index 8a08925706a..19ae1f929bb 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx @@ -1,6 +1,5 @@ import { WalletAddress } from "@/components/blocks/wallet-address"; import { - Flex, GridItem, SimpleGrid, Skeleton, @@ -84,7 +83,7 @@ const DirectListingCards: React.FC = ({ return ( <> - +

Direct Listing

@@ -100,7 +99,7 @@ const DirectListingCards: React.FC = ({ > View all -> - +
= ({ return ( <> - +
English Auctions = ({ > View all -> - +
= ({ chainSlug, }) => { return ( - - Listings +
+

Listings

+ {hasDirectListings && contract && ( = ({ chainSlug={chainSlug} /> )} + {hasEnglishAuctions && contract && ( = ({ chainSlug={chainSlug} /> )} - +
); }; @@ -298,7 +299,7 @@ const ListingCards: React.FC = ({ /> - +
{listing.asset.metadata.name} @@ -334,7 +335,7 @@ const ListingCards: React.FC = ({ {listing.currencyValue.displayValue}{" "} {listing.currencyValue.symbol} - +
))} diff --git a/apps/dashboard/src/contract-ui/tabs/listings/components/listing-stats.tsx b/apps/dashboard/src/contract-ui/tabs/listings/components/listing-stats.tsx index d9fe3a4f6a5..691e0bbdba1 100644 --- a/apps/dashboard/src/contract-ui/tabs/listings/components/listing-stats.tsx +++ b/apps/dashboard/src/contract-ui/tabs/listings/components/listing-stats.tsx @@ -1,9 +1,8 @@ -import { Skeleton, Stat, StatLabel, StatNumber } from "@chakra-ui/react"; +import { SkeletonContainer } from "@/components/ui/skeleton"; import { useMemo } from "react"; import type { ThirdwebContract } from "thirdweb"; import { totalAuctions, totalListings } from "thirdweb/extensions/marketplace"; import { useReadContract } from "thirdweb/react"; -import { Card } from "tw-components"; const TotalListingsStat: React.FC<{ contract: ThirdwebContract }> = ({ contract, @@ -20,16 +19,13 @@ const TotalListingsStat: React.FC<{ contract: ThirdwebContract }> = ({ ); return ( - - Total Listings - - {combinedListingCount.toString()} - - + ); }; @@ -41,12 +37,11 @@ const DirectListingsStat: React.FC<{ contract: ThirdwebContract }> = ({ }); return ( - - Direct Listings - - {(directListingsQuery.data || 0n).toString()} - - + ); }; @@ -58,12 +53,11 @@ const EnglishAuctionsStat: React.FC<{ contract: ThirdwebContract }> = ({ }); return ( - - English Auctions - - {(englishAuctionsQuery.data || 0n).toString()} - - + ); }; @@ -79,7 +73,7 @@ export const ListingStatsV3: React.FC = ({ hasEnglishAuctions, }) => { return ( -
+
{hasDirectListings && hasEnglishAuctions && contract && ( )} @@ -88,3 +82,20 @@ export const ListingStatsV3: React.FC = ({
); }; + +function StatCard(props: { + value: string; + isPending: boolean; + label: string; +}) { + return ( +
+
{props.label}
+
{v}
} + /> +
+ ); +}