diff --git a/src/pages/home/HomePage.tsx b/src/pages/home/HomePage.tsx index 1c81326..48f47bc 100644 --- a/src/pages/home/HomePage.tsx +++ b/src/pages/home/HomePage.tsx @@ -1,10 +1,16 @@ import React, { useEffect } from "react"; import styles from "./HomePage.module.css"; -import { Outlet } from "react-router-dom"; +import { Outlet, useNavigate } from "react-router-dom"; import { Header, LeftMenu, Footer } from "../../compenents"; import { login } from "../../api/index"; +import { getToken, clearToken } from "../../utils/index"; export const HomePage: React.FC = () => { + // const token = getToken(); + // const navigate = useNavigate(); + // if (token === "") { + // navigate("/login"); + // } useEffect(() => { login.login("1@qq.com", "123123", "1", "2"); }, []); diff --git a/src/utils/index.css b/src/utils/index.css index 93e0082..4ebb7cc 100644 --- a/src/utils/index.css +++ b/src/utils/index.css @@ -2,12 +2,16 @@ width: calc(100% - 32px) !important; margin-left: 16px !important; margin-right: 16px !important; + margin-top: 8px !important; + margin-bottom: 8px !important; } .ant-menu-submenu { width: calc(100% - 24px) !important; margin-left: 12px !important; margin-right: 12px !important; + margin-top: 6px !important; + margin-bottom: 6px !important; } .ant-menu,