diff --git a/frontend/src/components/Layout.jsx b/frontend/src/components/Layout.jsx index 97b75dd..993991b 100644 --- a/frontend/src/components/Layout.jsx +++ b/frontend/src/components/Layout.jsx @@ -15,10 +15,9 @@ const Layout = ({ children }) => { const location = useLocation(); const [searchParams] = useSearchParams(); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); - const [loginVisible, setLoginVisible] = useState(false); const [profileVisible, setProfileVisible] = useState(false); - const { user, login, logout } = useAuth(); + const { user, login, logout, loginModalVisible, showLoginModal, hideLoginModal } = useAuth(); // 全局监听并持久化 ref 参数 useEffect(() => { @@ -178,7 +177,7 @@ const Layout = ({ children }) => { ) : ( - + )}