jsx파일 페이지 이동 질문입니다. 채택완료
요고꽁
3년 전
조회 1,203
</p>
<p> const mintNFT1 = async () => {</p>
<p> let ret; </p>
<p> whiteListCheck();</p>
<p> if(process.env.REACT_APP_WHITELIST == "true" && WLFlag != 1){</p>
<p> alert("해당 주소는 민팅 대상 화이트리스트에 포함되어있지 않습니다.");</p>
<p> }else{</p>
<p> ret = await caver.klay.sendTransaction({</p>
<p> type: 'SMART_CONTRACT_EXECUTION',</p>
<p> from: account,</p>
<p> to: gachaAddress,</p>
<p> value: caver.utils.toPeb((NFTPrice * 1).toString(), 'KLAY'),</p>
<p> data: contract.methods.mint(mintCnt, process.env.REACT_APP_TREASURY_ACCOUNT,1, account).encodeABI(),</p>
<p> gas: '850000'</p>
<p> }).then((res)=>{console.log(res);})</p>
<p> .catch((err) => {alert("Mint has failed.");});</p>
<p> let mintCount = await contract.methods.getMintedCount(minterAddress).call();</p>
<p> setMintCnt(mintCount);</p>
<p> </p>
<p> await wait(3000);</p>
<p> </p>
<p> function mintNFT1() {document.myForm.action="/myShop/notice/List.jsp"; document.myForm.method="post"; document.myForm.submit(); }</p>
<p> </p>
<p> }</p>
<p> </p>
<p> }</p>
<p>
jsx파일인데 위에 코드중에서
function mintNFT1() {document.myForm.action="/myShop/notice/List.jsp"; document.myForm.method="post"; document.myForm.submit(); }
맨 마지막 요부분 완료후 해당 경로로 이동하게 할려고 합니다.
근데 먹질 않네요 ㅠㅠ 한번 봐주세요!!
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인