Lesson 13: onClick activateBrowserWallet not working #252
Answered
by
toddabraham
toddabraham
asked this question in
Q&A
-
Hi there, I have the button showing up as per the screen shot above, but my MetaMask Wallet is not opening on click. Here's my Header.tsx code.... import { useEthers } from "@usedapp/core"
export const Header = () => {
const { account, activateBrowserWallet, deactivate } = useEthers()
const isConnected = account !== undefined
return (
<div>
{isConnected ? (
<button color="primary">
onClick={deactivate}
Disconnect
</button>
) : (
<button color="primary"
onClick={() => activateBrowserWallet
}>
Connect
</button>
)
}
</div>
)
} |
Beta Was this translation helpful? Give feedback.
Answered by
toddabraham
Oct 25, 2021
Replies: 1 comment 1 reply
-
Found out I had to manually connect Hope this is helpful for someone. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
toddabraham
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found out I had to manually connect
http://localhost:3000/
to my browser MetaMask Wallet.Hope this is helpful for someone.