-
Notifications
You must be signed in to change notification settings - Fork 5
/
mint.tsx
39 lines (34 loc) · 1.09 KB
/
mint.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Web3Button } from "@thirdweb-dev/react";
import type { NextPage } from "next";
import { useRouter } from "next/router";
import styles from "../styles/Home.module.css";
const Mint: NextPage = () => {
const router = useRouter();
return (
<div className={styles.container}>
<h1 className={styles.h1}>Mint An NFT!</h1>
<p className={styles.explain}>
Here is where we use our <b>NFT Drop</b> contract to allow users to mint
one of the NFTs that we lazy minted.
</p>
<hr className={`${styles.smallDivider} ${styles.detailPageHr}`} />
<Web3Button
colorMode="dark"
accentColor="#5204BF"
contractAddress="0xE09F79034E928E70A215430676F9dfeaa713622f"
action={(contract) => contract.erc721.claim(1)}
onSuccess={() => {
alert("NFT Claimed!");
router.push(`/stake`);
}}
onError={(error) => {
console.error(error);
alert(error);
}}
>
Claim An NFT
</Web3Button>
</div>
);
};
export default Mint;