Skip to content

Commit

Permalink
fix: partnership wallet not open
Browse files Browse the repository at this point in the history
  • Loading branch information
fricoben committed Aug 2, 2023
1 parent 8345841 commit b1f3cb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/UI/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>(false);
const [hasWallet, setHasWallet] = useState<boolean>(true);
const [hasWallet, setHasWallet] = useState<boolean>(false);
const { address } = useAccount();
const [isConnected, setIsConnected] = useState<boolean>(false);
const [isWrongNetwork, setIsWrongNetwork] = useState(false);
Expand All @@ -37,6 +38,7 @@ const Navbar: FunctionComponent = () => {
const [navbarBg, setNavbarBg] = useState<boolean>(false);
const { hashes } = useTransactionManager();
const [showWallet, setShowWallet] = useState<boolean>(false);
const router = useRouter();

useEffect(() => {
// to handle autoconnect starknet-react adds connector id in local storage
Expand Down Expand Up @@ -290,7 +292,7 @@ const Navbar: FunctionComponent = () => {
/>
<Wallets
closeWallet={() => setHasWallet(false)}
hasWallet={Boolean(hasWallet && !isWrongNetwork)}
hasWallet={Boolean(hasWallet && !isWrongNetwork && router?.pathname !== "/partnership")}
/>
</>
);
Expand Down

1 comment on commit b1f3cb5

@vercel
Copy link

@vercel vercel bot commented on b1f3cb5 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.