An amazingly beautifully styled Web3 NFT Minter Dashboard Modal coded with ReactJS and Bootstrap that allows users to mint NFT's with different ERC-20 Crypto Currencies.
There is an issue with your react code.
Lets say the user approves the transfer of the ERC20 token, then accidentally or decides to not accept the minting request, the ERC20 token has already transferred into the smart contract. That is an issue that needs to be addressed.
Also, I think the transfer function should not exist in the mint1() function. The ERC20 transfer should happen in the smart contract. Saves gas fees that way.