Skip to content

Commit

Permalink
feat: display sold out when nfts minted fully
Browse files Browse the repository at this point in the history
  • Loading branch information
0xkynz authored Dec 2, 2023
1 parent 0a546ab commit 630a31a
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions packages/user/src/modules/campaign/campaign-detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,29 +164,35 @@ export const CampaignDetail = ({ campaignId }: CampaignDetailProps) => {
</>
)}
</div>
{!publicKey ? (
<ButtonConnect
className="px-8 h-12 w-[160px]"
buttonText="Connect Wallet"
/>
{totalNFTs >= 99 ? (
<div className="h-[72px]">SOLD OUT. Thanks for your support.</div>
) : (
<>
{data?.isOpenWhitelist ? (
<WhiteListForm campaignId={campaignId} />
{!publicKey ? (
<ButtonConnect
className="px-8 h-12 w-[160px]"
buttonText="Connect Wallet"
/>
) : (
<>
{isFinishedCampaign ? (
<Button disabled className="disabled px-8 h-12">
Campaign ended
</Button>
{data?.isOpenWhitelist ? (
<WhiteListForm campaignId={campaignId} />
) : (
<div>
<NFTMinter
nftCollection={nftCollection}
campaignId={campaignId}
isAllowWhitelistUser={data?.isAllowWhitelistUser}
/>
</div>
<>
{isFinishedCampaign ? (
<Button disabled className="disabled px-8 h-12">
Campaign ended
</Button>
) : (
<div>
<NFTMinter
nftCollection={nftCollection}
campaignId={campaignId}
isAllowWhitelistUser={data?.isAllowWhitelistUser}
/>
</div>
)}
</>
)}
</>
)}
Expand Down

0 comments on commit 630a31a

Please sign in to comment.