I am building a DApp but one that a user inputs the metadata and image to mint an NFT.
That all works fine but I want to add a quantity function that actually mints the # of NFT's they input with a minimum of 1 and a maximum of 100.
right now I have quantity as a state variable
const [quantity, setQuantity]= useState("");
and I have a button that when pressed connects to a function {onMintPressed}
<button onClick={ onMintPressed }> Mint NFT </button>
Right now the quantity is just an input with this code
<label className={classes.customLabel}>Quantity </label>
<input
className={classes.customInput}
type="number"
min={1}
max={100}
placeholder="1-100"
onChange={(event) => setQuantity(event.target.value)}
I am new to this but, ideally in a perfect simple coding world the function would look like this
<button onClick={onMintPressed * x(quantity)}> Mint NFT </button>
I know this does not work and is not a function in itself but that's just the simplest way to explain what I am trying to do
Any help is appreciated, thank you!