Skip to content

Commit

Permalink
Fix NFT card links for Goerli and other testnets
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanasa committed Aug 24, 2023
1 parent 67af713 commit a34d12e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/NftCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ export default function NftCard({ nft, principal, time }: NftCardProps) {
const [metadata] = useNftMetadata(nft.network, nft.contract, nft.tokenId);

const url = `https://${
nft.network === 'sepolia' ? 'testnets.' : ''
nft.network !== 'mainnet' ? 'testnets.' : ''
}opensea.io/assets/${nft.network}/${nft.contract}/${nft.tokenId}`;

console.log(metadata); ///
if (!metadata) {
return null;
}
Expand All @@ -28,9 +27,6 @@ export default function NftCard({ nft, principal, time }: NftCardProps) {
target="_blank"
rel="noreferrer"
>
{metadata.tokenType === 'NOT_A_CONTRACT' && (
<div tw="text-xl opacity-60">(Not found)</div>
)}
<div tw="flex items-center gap-3">
{!!metadata.media.length && (
<img
Expand Down

0 comments on commit a34d12e

Please sign in to comment.