I'm trying to make a claim page in next.js that would allow logged in metamask address to:
- read data provided in .json file locally to see if the account is eligible for claiming the item and rendering a claim page
- on submiting form to write to .json that the item has been claimed.
I used this tutorial on how to connect to a metamask account: https://medium.com/@prodmxle/adding-metamask-authentication-in-next-js-application-using-the-thirdweb-9d23e9147496
except styling my project currently looks the same as code in the tutorial.
.json:
{
"wallets": [
{
"wallet": "YOUR_ROPSTEN WALLET1",
"tokenAmount": 44,
"hasPizza": true,
"hasCoffee": false,
"hasBurger": false,
"hasClaimed": false
},
{
"wallet": "YOUR_ROPSTEN WALLET2",
"tokenAmount": 2,
"hasPizza": false,
"hasCoffee": false,
"hasBurger": false,
"hasClaimed": true
},
{
"wallet": "YOUR_ROPSTEN WALLET3",
"tokenAmount": 4,
"hasPizza": false,
"hasCoffee": false,
"hasBurger": false,
"hasClaimed": true
}
]
}