• Hooks
  • useTokenGating

useTokenGating

Hook to provide token-gating for components.

import { useTokenGating } from "@mintdrop/sdk"

Usage

function UseTokenGating() {
  const { address } = useAccount()
  const { allow } = useTokenGating(address)
 
  return (
    <div>
      Current Wallet: {address}
      <br />
      Allow Access: {JSON.stringify(allow)}
    </div>
  )
}