Skip to content

Commit

Permalink
show how many NFTs are left to claim (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves authored Jan 14, 2025
1 parent a223253 commit 403f91b
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions src/pages/communities/nft/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,12 @@ export default function Page() {
<div className="flex items-center gap-3 mb-2">
<div className="rounded-xl overflow-hidden">
{nftInfo?.leftImageSrc && (
<Image src={nftInfo.leftImageSrc} width={50} height={50} alt="Early Adopters" />
<Image
src={nftInfo.leftImageSrc}
width={50}
height={50}
alt={nftInfo?.title || 'Early Adopters'}
/>
)}
</div>
<div className="font-semibold">{nftInfo?.title}</div>
Expand Down Expand Up @@ -343,16 +348,19 @@ export default function Page() {
<div>
<Paragraph className="text-[18px]">{nftInfo?.title}</Paragraph>
{nftInfo?.isMintable && (
<Button
variant="primary"
className="my-[16px]"
onClick={handleMinting}
disabled={!tokensAvailable || !address || isClaiming || isChecking}
loading={isClaiming || isChecking}
data-testid="claimButton"
>
Claim it!
</Button>
<>
<Paragraph size="small">{tokensAvailable} NFTs left to claim.</Paragraph>
<Button
variant="primary"
className="my-[16px]"
onClick={handleMinting}
disabled={!tokensAvailable || !address || isClaiming || isChecking}
loading={isClaiming || isChecking}
data-testid="claimButton"
>
Claim it!
</Button>
</>
)}
<Span className="text-[14px] tracking-wide hidden">
Crypto ipsum bitcoin ethereum dogecoin litecoin. Hedera USD kadena chainlink weave hive
Expand Down

0 comments on commit 403f91b

Please sign in to comment.