Open outerspacesoph opened 1 year ago
I had the same issue too. Be sure that in the main.jsx in client/src
you are using the StateContextProvider
root.render(
<ThirdwebProvider desiredChainId={ChainId.Goerli}>
<Router>
<StateContextProvider>
<App />
</StateContextProvider>
</Router>
</ThirdwebProvider>
)
The react app isn't working as I keep getting this error in the console: Cannot destructure property 'connect' of 'useStateContext(...)' as it is undefined at Navbar (Navbar.jsx:13:11).
const Navbar = () => { const navigate = useNavigate(); const [isActive, setIsActive] = useState("dashboard"); const [toggleDrawer, setToggleDrawer] = useState(false); const { connect, address } = useStateContext();