mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
default Alova v2
This commit is contained in:
@@ -6,7 +6,12 @@ import { AppBar, IconButton, Toolbar, Typography } from '@mui/material';
|
||||
|
||||
export const DRAWER_WIDTH = 210;
|
||||
|
||||
export default function LayoutAppBar({ title, onToggleDrawer }) {
|
||||
interface LayoutAppBarProps {
|
||||
title: string;
|
||||
onToggleDrawer: () => void;
|
||||
}
|
||||
|
||||
const LayoutAppBar = ({ title, onToggleDrawer }: LayoutAppBarProps) => {
|
||||
const pathnames = useLocation()
|
||||
.pathname.split('/')
|
||||
.filter((x) => x);
|
||||
@@ -50,4 +55,6 @@ export default function LayoutAppBar({ title, onToggleDrawer }) {
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default LayoutAppBar;
|
||||
|
||||
@@ -16,7 +16,12 @@ const LayoutDrawerLogo = styled('img')(({ theme }) => ({
|
||||
}
|
||||
}));
|
||||
|
||||
export default function LayoutDrawerProps({ mobileOpen, onClose }) {
|
||||
interface LayoutDrawerProps {
|
||||
mobileOpen: boolean;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
const LayoutDrawerProps = ({ mobileOpen, onClose }: LayoutDrawerProps) => {
|
||||
const drawer = (
|
||||
<>
|
||||
<Toolbar disableGutters>
|
||||
@@ -59,4 +64,6 @@ export default function LayoutDrawerProps({ mobileOpen, onClose }) {
|
||||
</Drawer>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default LayoutDrawerProps;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Blocker } from 'react-router-dom';
|
||||
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
@@ -9,7 +11,7 @@ import {
|
||||
import { dialogStyle } from 'CustomTheme';
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
|
||||
export default function BlockNavigation({ blocker }) {
|
||||
const BlockNavigation = ({ blocker }: { blocker: Blocker }) => {
|
||||
const { LL } = useI18nContext();
|
||||
|
||||
return (
|
||||
@@ -34,4 +36,6 @@ export default function BlockNavigation({ blocker }) {
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default BlockNavigation;
|
||||
|
||||
Reference in New Issue
Block a user