For my NFT minting dAPP, I have incorporated 4 unique NFT minting pages within my nextjs web app. After each successful minting, a button dynamically appears labeled "View on OpenSea".
Upon clicking this button, the intention is to open a new tab directing users to the individual listing through a URL structured as follows:
"testnets.opensea.io/assets/mumbai/0xb636c1a63c3b092a7c74304b1947b0162d08a1e4/0".
The contract address (0xb63...) and tokenID (/0) are vital components of this URL link. While I have successfully stored the tokenId in a data file and passed it as a prop across various sections of my application, I am struggling with incorporating it into the URL.
This is what my current code snippet looks like:
const url =
"testnets.opensea.io/assets/mumbai/0xb636c1a63c3b092a7c74304b1947b0162d08a1e4/{props.id}";
window.open(url, "_blank");
};
Regrettably, this implementation does not yield the desired outcome. Any guidance or assistance regarding this matter would be greatly appreciated. For reference, here is the specific line of code in my repository: https://github.com/redbrickmedia/rdbrck-nft/blob/0872e3bbd69ae12ff2b2d5532d5e0da0c78663fa/components/Buttons.js#L52