@@ -74,7 +74,7 @@ const Sidebar = ({ drawerOpen, drawerToggle, window }) => {
-
+ >
);
const container = window !== undefined ? () => window().document.body : undefined;
diff --git a/src/layout/MainLayout/index.js b/src/layout/MainLayout/index.js
index 5a4c32d78..c62ad6690 100644
--- a/src/layout/MainLayout/index.js
+++ b/src/layout/MainLayout/index.js
@@ -1,6 +1,6 @@
-import PropTypes from 'prop-types';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
+import { Outlet } from 'react-router-dom';
// material-ui
import { makeStyles, useTheme } from '@material-ui/styles';
@@ -10,13 +10,13 @@ import { AppBar, CssBaseline, Toolbar, useMediaQuery } from '@material-ui/core';
import clsx from 'clsx';
// project imports
-import Breadcrumbs from './../../ui-component/extended/Breadcrumbs';
+import Breadcrumbs from 'ui-component/extended/Breadcrumbs';
import Header from './Header';
import Sidebar from './Sidebar';
-import Customization from './../Customization';
-import navigation from './../../menu-items';
-import { drawerWidth } from '../../store/constant';
-import { SET_MENU } from './../../store/actions';
+import Customization from '../Customization';
+import navigation from 'menu-items';
+import { drawerWidth } from 'store/constant';
+import { SET_MENU } from 'store/actions';
// assets
import { IconChevronRight } from '@tabler/icons';
@@ -74,9 +74,9 @@ const useStyles = makeStyles((theme) => ({
}
}));
-//-----------------------|| MAIN LAYOUT ||-----------------------//
+// ===========================|| MAIN LAYOUT ||=========================== //
-const MainLayout = ({ children }) => {
+const MainLayout = () => {
const classes = useStyles();
const theme = useTheme();
const matchDownMd = useMediaQuery(theme.breakpoints.down('md'));
@@ -121,19 +121,13 @@ const MainLayout = ({ children }) => {
}
])}
>
- {/*
*/}
{/* breadcrumb */}
- {children}
- {/* */}
+
);
};
-MainLayout.propTypes = {
- children: PropTypes.node
-};
-
export default MainLayout;
diff --git a/src/layout/MinimalLayout/index.js b/src/layout/MinimalLayout/index.js
index 02a9d76b9..f8b81c9dc 100644
--- a/src/layout/MinimalLayout/index.js
+++ b/src/layout/MinimalLayout/index.js
@@ -1,22 +1,16 @@
-import PropTypes from 'prop-types';
import React from 'react';
+import { Outlet } from 'react-router-dom';
// project imports
-import Customization from './../Customization';
+import Customization from '../Customization';
-//-----------------------|| MINIMAL LAYOUT ||-----------------------//
+// ===========================|| MINIMAL LAYOUT ||=========================== //
-const MinimalLayout = (props) => {
- return (
-