|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Outlet, Link, useHref, useLocation } from "react-router-dom";
|
|
|
|
|
import { Outlet, Link, useHref, useLocation, NavLink } from "react-router-dom";
|
|
|
|
|
import { useEffect } from "react";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { Layout, Menu, ConfigProvider, theme, Dropdown, Space, Row, Col, Alert, App as AntApp } from "antd";
|
|
|
|
@ -10,18 +10,18 @@ import { useStore } from "@/stores/StoreContext.js";
|
|
|
|
|
const { Header, Content, Footer } = Layout;
|
|
|
|
|
const items = [
|
|
|
|
|
{
|
|
|
|
|
label: (<Link to="/account/change-password">Change password</Link>),
|
|
|
|
|
label: <Link to="/account/change-password">Change password</Link>,
|
|
|
|
|
key: "0",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: (<Link to="/account/profile">Profile</Link>),
|
|
|
|
|
label: <Link to="/account/profile">Profile</Link>,
|
|
|
|
|
key: "1",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "divider",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: (<Link to="/login">Logout</Link>),
|
|
|
|
|
label: <Link to="/login">Logout</Link>,
|
|
|
|
|
key: "3",
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
@ -34,11 +34,11 @@ function App() {
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// Check location
|
|
|
|
|
console.info("location.pathname: " + location.pathname);
|
|
|
|
|
console.info(location.pathname.split('/'));
|
|
|
|
|
console.info(location.pathname.split("/"));
|
|
|
|
|
}, [location]);
|
|
|
|
|
|
|
|
|
|
const splitPath = location.pathname.split('/');
|
|
|
|
|
let defaultPath = 'reservation';
|
|
|
|
|
const splitPath = location.pathname.split("/");
|
|
|
|
|
let defaultPath = "reservation";
|
|
|
|
|
|
|
|
|
|
if (splitPath.length > 1) {
|
|
|
|
|
defaultPath = splitPath[1];
|
|
|
|
@ -64,7 +64,9 @@ function App() {
|
|
|
|
|
<Header className="header" style={{ position: "sticky", top: 0, zIndex: 1, width: "100%" }}>
|
|
|
|
|
<Row gutter={{ md: 24 }} justify="end">
|
|
|
|
|
<Col span={20}>
|
|
|
|
|
<NavLink to="/">
|
|
|
|
|
<img src={AppLogo} className="logo" alt="App logo" />
|
|
|
|
|
</NavLink>
|
|
|
|
|
<Menu
|
|
|
|
|
theme="dark"
|
|
|
|
|
mode="horizontal"
|
|
|
|
@ -93,7 +95,7 @@ function App() {
|
|
|
|
|
</Row>
|
|
|
|
|
</Header>
|
|
|
|
|
|
|
|
|
|
<Alert message="公告 查看后不再显示,或者一直显示,或者放到页面底部" description="" type="info" banner closable />
|
|
|
|
|
<Alert message={<NavLink to="/notice">公告 查看后不再显示,或者一直显示,或者放到页面底部</NavLink>} description="" type="info" banner closable />
|
|
|
|
|
|
|
|
|
|
<Content
|
|
|
|
|
style={{
|
|
|
|
|