I was able to mint NFT but after compiling and mirgrating contract mint function now comepletely doesnt work. the error Im running in to is :
main.js:203 Uncaught (in promise) ReferenceError: tokenContract is not defined
at mintNft (main.js:203)
at HTMLButtonElement.createItem (main.js:167)
mintNft @ main.js:203
createItem @ main.js:167
async function (async)
createItem @ main.js:145
and here are the lines of code the console keeps referencing
mintNft = async (metadataUrl) =>
{
const receipt = await tokenContract.methods.createItem(metadataUrl).send({from: ethereum.selectedAddress});
return receipt.events.Transfer.returnValues.tokenId;
}