diff --git a/components/manifold-minting/ManifoldMinting.tsx b/components/manifold-minting/ManifoldMinting.tsx index 421ca46df7..a97e5af6da 100644 --- a/components/manifold-minting/ManifoldMinting.tsx +++ b/components/manifold-minting/ManifoldMinting.tsx @@ -577,7 +577,11 @@ function ManifoldMemesMintingPhases( }> ) { const [distribution, setDistribution] = useState(); - const phases = buildMemesPhases(props.mint_date); + const phaseAnchorDate = + props.claim.startDate > 0 + ? Time.seconds(props.claim.startDate) + : props.mint_date; + const phases = buildMemesPhases(phaseAnchorDate); useEffect(() => { if (props.address) { diff --git a/components/nft-marketplace-links/NFTMarketplaceLinks.tsx b/components/nft-marketplace-links/NFTMarketplaceLinks.tsx index 2b16bacd34..2f8ec3e500 100644 --- a/components/nft-marketplace-links/NFTMarketplaceLinks.tsx +++ b/components/nft-marketplace-links/NFTMarketplaceLinks.tsx @@ -3,6 +3,56 @@ import useIsMobileScreen from "@/hooks/isMobileScreen"; import Link from "next/link"; import { isGradientsContract } from "@/helpers/Helpers"; +type MarketplaceLink = { + key: string; + title: string; + alt: string; + imageSrc: string; + enabled: boolean; + getHref: (contract: string, id: string | number) => string; + shouldShow?: (contract: string) => boolean; +}; + +const MARKETPLACES: readonly MarketplaceLink[] = [ + { + key: "opensea", + title: "OpenSea", + alt: "opensea", + imageSrc: "/opensea.png", + enabled: true, + getHref: (contract: string, id: string | number) => + `https://opensea.io/assets/ethereum/${contract}/${id}`, + }, + { + key: "blur", + title: "Blur.io", + alt: "blur", + imageSrc: "/blur.png", + enabled: true, + shouldShow: (contract: string) => isGradientsContract(contract), + getHref: (contract: string, id: string | number) => + `https://blur.io/eth/asset/${contract}/${id}`, + }, + { + key: "magiceden", + title: "Magic Eden", + alt: "magic-eden", + imageSrc: "/magiceden.png", + enabled: false, + getHref: (contract: string, id: string | number) => + `https://magiceden.io/item-details/ethereum/${contract}/${id}`, + }, + { + key: "rarible", + title: "Rarible", + alt: "rarible", + imageSrc: "/rarible.svg", + enabled: true, + getHref: (contract: string, id: string | number) => + `https://rarible.com/ethereum/items/${contract}:${id}`, + }, +]; + export default function NFTMarketplaceLinks({ contract, id, @@ -12,71 +62,32 @@ export default function NFTMarketplaceLinks({ }) { const isMobile = useIsMobileScreen(); const size = isMobile ? 25 : 35; + const visibleMarketplaces = MARKETPLACES.filter( + (marketplace) => + marketplace.enabled && + (marketplace.shouldShow ? marketplace.shouldShow(contract) : true) + ); return (
- - opensea - - {isGradientsContract(contract) && ( + {visibleMarketplaces.map((marketplace) => ( blur - )} - - magic-eden - - - rarible - + ))}
); }