How to disable scroll to top when calling open function from useWeb3Modal hook? #4369
Unanswered
mhmmdhajizade
asked this question in
web3modal-sdk-support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I am trying to use web3modal in my next js app and when I call
open
function from useWeb3Modal hook, on click a button whole window scrolls to top and then opens the modal. How can I disable this behavior?Here id my code
`
import { Button } from "@mui/material";
import { useWeb3Modal } from "@web3modal/wagmi/react";
function OpenModal() {
const { open } = useWeb3Modal();
return <Button onClick={() => open({ view: "Connect" })}>Connect Wallet;
}
export default OpenModal;
`
Beta Was this translation helpful? Give feedback.
All reactions