路由丢失页添加

This commit is contained in:
禺狨 2023-03-02 15:05:28 +08:00
parent 0bf57e8b6c
commit bb7807f87a
2 changed files with 11 additions and 1 deletions

View File

@ -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");
}, []);

View File

@ -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,