neu-fi / regen-bingo

Monorepo for both backend and contract developments of Regen Bingo!
https://regen.bingo
2 stars 1 forks source link

Using Wagmi Hooks on Lucky Numbers Page #114

Closed oytuncoban closed 1 year ago

vercel[bot] commented 1 year ago

@oytuncoban is attempting to deploy a commit to the Neufi Team on Vercel.

To accomplish this, @oytuncoban needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

hantuzun commented 1 year ago

I'll merge but we should fix these later:

  1. Those are not hooks as they're not returning anything. See:https://www.w3schools.com/react/react_customhooks.asp

  2. We better abstract everything about contract events to hooks. Such as:

import { useAccount } from 'wagmi'

const { address  } = useAccount();
const tokensOfOwner = RegenBingo.useTokensOfOwner(address)
  1. Just delete lines, do not comment out.

Otherwise, you've done a good job. Thanks!