auto close sideMenu on mobile and removed close button on sider
parent
e3f78ce092
commit
730eee9751
|
@ -322,12 +322,20 @@ export default function SideMenu({
|
|||
topic: pathname,
|
||||
browserTabSession: BrowserTabSession,
|
||||
});
|
||||
|
||||
// auto close sideMenu on mobile
|
||||
if (
|
||||
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
||||
navigator.userAgent
|
||||
)
|
||||
) {
|
||||
setIsSideMenuCollapsed(true);
|
||||
}
|
||||
}, [location.pathname]);
|
||||
|
||||
return (
|
||||
<Sider
|
||||
theme="light"
|
||||
//style={{ overflow: "auto", position: "fixed", height: "100vh" }}
|
||||
style={{
|
||||
overflow: "auto",
|
||||
height: "100vh",
|
||||
|
@ -337,7 +345,7 @@ export default function SideMenu({
|
|||
bottom: 0,
|
||||
}}
|
||||
breakpoint="lg"
|
||||
collapsedWidth="0"
|
||||
collapsedWidth={1}
|
||||
collapsed={isSideMenuCollapsed}
|
||||
onCollapse={(collapsed) => setIsSideMenuCollapsed(collapsed)}
|
||||
>
|
||||
|
|
|
@ -27,13 +27,7 @@ import {
|
|||
} from "../../utils";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
CopyOutlined,
|
||||
EyeInvisibleOutlined,
|
||||
EyeOutlined,
|
||||
FileTextOutlined,
|
||||
KeyOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { FileTextOutlined, KeyOutlined } from "@ant-design/icons";
|
||||
import { MyUserAvatar } from "../../Components/MyAvatar";
|
||||
import { useUserProfileContext } from "../../Contexts/UserProfileContext";
|
||||
import { useWebSocketContext } from "../../Contexts/WebSocketContext";
|
||||
|
|
Loading…
Reference in New Issue