From b1f3cb5276baf02a26580c5062f010748505d8de Mon Sep 17 00:00:00 2001 From: Fricoben Date: Wed, 2 Aug 2023 20:37:56 +0200 Subject: [PATCH] fix: partnership wallet not open --- components/UI/navbar.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/UI/navbar.tsx b/components/UI/navbar.tsx index c0d49522..8217785b 100644 --- a/components/UI/navbar.tsx +++ b/components/UI/navbar.tsx @@ -17,10 +17,11 @@ import { constants } from "starknet"; import ModalWallet from "./modalWallet"; import { CircularProgress } from "@mui/material"; import AccountCircleIcon from "@mui/icons-material/AccountCircle"; +import { useRouter } from "next/router"; const Navbar: FunctionComponent = () => { const [nav, setNav] = useState(false); - const [hasWallet, setHasWallet] = useState(true); + const [hasWallet, setHasWallet] = useState(false); const { address } = useAccount(); const [isConnected, setIsConnected] = useState(false); const [isWrongNetwork, setIsWrongNetwork] = useState(false); @@ -37,6 +38,7 @@ const Navbar: FunctionComponent = () => { const [navbarBg, setNavbarBg] = useState(false); const { hashes } = useTransactionManager(); const [showWallet, setShowWallet] = useState(false); + const router = useRouter(); useEffect(() => { // to handle autoconnect starknet-react adds connector id in local storage @@ -290,7 +292,7 @@ const Navbar: FunctionComponent = () => { /> setHasWallet(false)} - hasWallet={Boolean(hasWallet && !isWrongNetwork)} + hasWallet={Boolean(hasWallet && !isWrongNetwork && router?.pathname !== "/partnership")} /> );