浏览代码

モバイルサイズのときにドロアーが出現しないのを修正

develop
sosuke.iwabuchi 2 年前
父节点
当前提交
b90439b273
共有 1 个文件被更改,包括 7 次插入9 次删除
  1. +7
    -9
      src/layouts/dashbord/index.tsx

+ 7
- 9
src/layouts/dashbord/index.tsx 查看文件

@@ -23,7 +23,7 @@ function Copyright() {
function App() { function App() {
const [mobileOpen, setMobileOpen] = useState(false); const [mobileOpen, setMobileOpen] = useState(false);


const { drawerWidth, innerWidth, contentsWidth, showDrawer } = useDashboard();
const { drawerWidth, innerWidth, contentsWidth } = useDashboard();


const handleDrawerToggle = () => { const handleDrawerToggle = () => {
setMobileOpen(!mobileOpen); setMobileOpen(!mobileOpen);
@@ -35,14 +35,12 @@ function App() {
component="nav" component="nav"
sx={{ width: { sm: drawerWidth }, flexShrink: { md: 0 } }} sx={{ width: { sm: drawerWidth }, flexShrink: { md: 0 } }}
> >
{showDrawer && (
<Navigator
PaperProps={{ style: { width: drawerWidth } }}
variant="temporary"
open={mobileOpen}
onClose={handleDrawerToggle}
/>
)}
<Navigator
PaperProps={{ style: { width: drawerWidth } }}
variant="temporary"
open={mobileOpen}
onClose={handleDrawerToggle}
/>
<Navigator <Navigator
PaperProps={{ style: { width: drawerWidth } }} PaperProps={{ style: { width: drawerWidth } }}
sx={{ display: { sm: "block", xs: "none" } }} sx={{ display: { sm: "block", xs: "none" } }}


正在加载...
取消
保存