diff --git a/client/components/nav/NavBar.tsx b/client/components/nav/NavBar.tsx index 5d7e575..dc3744e 100644 --- a/client/components/nav/NavBar.tsx +++ b/client/components/nav/NavBar.tsx @@ -3,21 +3,25 @@ import { FC, useState } from "react" import Button from "../common/Button" import Logo from "../common/Logo" -import LoginModal from "../login/LoginModal" +import LoginModal, { LoginModelProps } from "../login/LoginModal" const NavBar: FC = () => { - const [showLogin, setShowLogin] = useState(false) - const [showTab, setShowTab] = useState(0) + const [modalProps, setModalProps] = useState({ + isOpen: false, + defaultPage: 0, + }) - const showLoginTab = () => { - setShowTab(0) - setShowLogin(true) - } + const showLoginTab = () => + setModalProps({ + defaultPage: 0, + isOpen: true, + }) - const showSignupTab = () => { - setShowTab(1) - setShowLogin(true) - } + const showSignupTab = () => + setModalProps({ + defaultPage: 1, + isOpen: true, + }) return ( )