From b46115856891d23ae9279abd9cb9660429b61f76 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Thu, 7 Sep 2023 15:32:23 +0800 Subject: [PATCH] add dashboard for gld user and public user --- src/layout/MainLayout/index.js | 11 +++-- src/pages/authentication/AuthWrapper.js | 6 +-- src/pages/authentication/AuthWrapperCustom.js | 4 +- src/pages/authentication/BusRegister.js | 4 +- src/pages/authentication/Register.js | 2 +- src/pages/gldDashboard/index.js | 31 +++----------- src/pages/publicDashboard/index.js | 40 +++++++++---------- src/routes/GLDUserRoutes.js | 3 +- src/routes/PublicUserRoutes.js | 3 +- 9 files changed, 44 insertions(+), 60 deletions(-) diff --git a/src/layout/MainLayout/index.js b/src/layout/MainLayout/index.js index d046c5b..9068671 100644 --- a/src/layout/MainLayout/index.js +++ b/src/layout/MainLayout/index.js @@ -5,19 +5,24 @@ import { useDispatch, useSelector } from 'react-redux'; // material-ui import { useTheme } from '@mui/material/styles'; import { Box, useMediaQuery } from '@mui/material'; +import Loadable from 'components/Loadable'; +import { lazy } from 'react'; // import { Toolbar, useMediaQuery } from '@mui/material'; // project import // import Drawer from './Drawer'; -import Header from './Header'; -import Footer from 'components/cards/AuthFooter'; +// import Header from './Header'; +const Header = Loadable(lazy(() => import('./Header'))); +const Footer = Loadable(lazy(() => import('components/cards/AuthFooter'))); + +// import Footer from 'components/cards/AuthFooter'; // import navigation from 'menu-items'; // import Breadcrumbs from 'components/@extended/Breadcrumbs'; // types import { openDrawer } from 'store/reducers/menu'; -import "assets/style/styles.css"; +// import "assets/style/styles.css"; // ==============================|| MAIN LAYOUT ||============================== // diff --git a/src/pages/authentication/AuthWrapper.js b/src/pages/authentication/AuthWrapper.js index 4c51d31..3409f58 100644 --- a/src/pages/authentication/AuthWrapper.js +++ b/src/pages/authentication/AuthWrapper.js @@ -25,7 +25,7 @@ const BackgroundHead = { // ==============================|| AUTHENTICATION - WRAPPER ||============================== // const AuthWrapper = ({ children }) => ( - + {/* */} {/* banner */}
@@ -35,7 +35,7 @@ const AuthWrapper = ({ children }) => ( justifyContent="space-between" alignItems="center" sx={{ - minHeight: '80vh' + minHeight: '90vh' }} > @@ -56,7 +56,7 @@ const AuthWrapper = ({ children }) => ( container justifyContent="right" alignItems="center" - sx={{ minHeight: { xs: 'calc(80vh - 134px)', md: 'calc(80vh - 112px)' } }} + sx={{ minHeight: { xs: 'calc(90vh - 134px)', md: 'calc(90vh - 112px)' } }} > {children} diff --git a/src/pages/authentication/AuthWrapperCustom.js b/src/pages/authentication/AuthWrapperCustom.js index fbff523..6070812 100644 --- a/src/pages/authentication/AuthWrapperCustom.js +++ b/src/pages/authentication/AuthWrapperCustom.js @@ -24,7 +24,7 @@ const AuthWrapperCustom = ({ children }) => ( justifyContent="center" alignItems="flex-start" sx={{ - minHeight: '60vh' + minHeight: '90vh', }} > {/* @@ -37,7 +37,7 @@ const AuthWrapperCustom = ({ children }) => ( container justifyContent="center" alignItems="flex-start" - sx={{ minHeight: { xs: 'calc(60vh - 134px)', md: 'calc(60vh - 112px)' }}} + sx={{ minHeight: { xs: 'calc(90vh - 134px)', md: 'calc(90vh - 112px)' }}} > {children} diff --git a/src/pages/authentication/BusRegister.js b/src/pages/authentication/BusRegister.js index 96ff6d1..8173385 100644 --- a/src/pages/authentication/BusRegister.js +++ b/src/pages/authentication/BusRegister.js @@ -97,7 +97,7 @@ return( // - + {steps.map((label, index) => ( @@ -136,7 +136,7 @@ {/* */} - + { activeStep === totalSteps() - 1 ? (