default Alova v2

This commit is contained in:
proddy
2024-08-10 10:22:14 +02:00
parent efa9718081
commit bb98042957
38 changed files with 574 additions and 287 deletions

View File

@@ -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;

View File

@@ -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;