feat: 解决导航跳转失效的问题

This commit is contained in:
zdl
2025-10-11 17:50:57 +08:00
parent 864844a52b
commit 6f81259f8c

View File

@@ -43,7 +43,9 @@ import { useAuth } from '../../contexts/AuthContext';
* 2. !isMobile * 2. !isMobile
*/ */
const NavItems = ({ isAuthenticated, user }) => { const NavItems = ({ isAuthenticated, user }) => {
if (isAuthenticated && user) { const navigate = useNavigate();
if (!isAuthenticated && !user) {
return ( return (
<HStack spacing={8}> <HStack spacing={8}>
<Menu> <Menu>