Open billsbooth opened 1 year ago
@kingaptos your hook call needs to be inside the render function:
const Home: NextPage = () => {
const { connect } = useWallet();
return (
<div>
<button onClick={() => { connect(AptosWalletName); }} > Connect </button>
</div>
)
}
Just following the tutorial on a next.js setup, and getting
TypeError: Cannot read properties of null (reading 'useContext')
when trying to calluseWallet();