Skip to content

Commit 215b28d

Browse files
authored
Merge pull request #741 from joshpainter/fix/691-nft-edition-infinity
Fix #691: display ∞ for NFT edition_total=0
2 parents 0b6a05f + 19e586c commit 215b28d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/NftCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,12 @@ export function NftCard({ nft, updateNfts, selectionState }: NftCardProps) {
317317
<TooltipContent>
318318
<p>
319319
{nftName}
320-
{nft.edition_total != null && nft.edition_total > 1 && (
320+
{nft.edition_total != null && (nft.edition_total === 0 || nft.edition_total > 1) && (
321321
<span>
322322
{' '}
323323
(
324324
<Trans>
325-
{nft.edition_number} of {nft.edition_total}
325+
{nft.edition_number} of {nft.edition_total === 0 ? '∞' : nft.edition_total}
326326
</Trans>
327327
)
328328
</span>

src/pages/Nft.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ export default function Nft() {
272272
address={nft?.launcher_id ?? ''}
273273
/>
274274

275-
{nft?.edition_total != null && nft?.edition_total > 1 && (
275+
{nft?.edition_total != null && (nft?.edition_total === 0 || nft?.edition_total > 1) && (
276276
<LabeledItem
277277
label={t`Edition`}
278-
content={`${nft.edition_number} of ${nft.edition_total}`}
278+
content={`${nft.edition_number} of ${nft.edition_total === 0 ? '∞' : nft.edition_total}`}
279279
/>
280280
)}
281281

0 commit comments

Comments
 (0)