| | |
| | | import { createPortal } from 'react-dom'; |
| | | import { useLocation } from 'react-router-dom'; |
| | | import { Layout as RALayout, CheckForApplicationUpdate, useSidebarState } from "react-admin"; |
| | | import AppBar from './AppBar'; |
| | | import { MyMenu } from './MyMenu'; |
| | |
| | | import { Box } from '@mui/material'; |
| | | import { TabDialogStateProvider } from '@/context/TabDialogStateContext'; |
| | | |
| | | /** RCS测试独立页路由:不显示侧边栏和标签栏,整页只显示RCS测试内容 */ |
| | | const RCS_TEST_STANDALONE_PATH = '/rcsTest-page'; |
| | | |
| | | const LayoutContent = ({ children }) => { |
| | | const location = useLocation(); |
| | | const [sidebarIsOpen] = useSidebarState(); |
| | | const sidebarWidth = sidebarIsOpen ? 200 : 50; |
| | | |
| | | if (location.pathname === RCS_TEST_STANDALONE_PATH) { |
| | | return ( |
| | | <Box sx={{ width: '100%', height: '100vh', overflow: 'hidden' }}> |
| | | {children} |
| | | <CheckForApplicationUpdate /> |
| | | </Box> |
| | | ); |
| | | } |
| | | |
| | | const tabsBarEl = ( |
| | | <Box sx={{ |
| | | position: 'fixed', |