-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaning up styled and custom components
- Loading branch information
Showing
149 changed files
with
1,839 additions
and
3,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,65 @@ | ||
// App.js | ||
import React, { useEffect } from 'react'; | ||
import React, { Suspense, lazy } from 'react'; | ||
import './assets/css/index.css'; | ||
import './assets/css/card.css'; | ||
import './assets/css/page.css'; | ||
import Main from './Main'; | ||
// ==============================|| APP ||============================== // | ||
import useManageCookies from 'context/hooks/useManageCookies'; | ||
import useConfigurator from 'context/hooks/useConfigurator'; | ||
import PageLayout from 'layout/REUSABLE_COMPONENTS/layout-utils/PageLayout'; | ||
import Navigation from 'layout/navigation'; | ||
import Configurator from 'layout/REUSABLE_COMPONENTS/Configurator'; | ||
import { CSSTransition, TransitionGroup } from 'react-transition-group'; | ||
import LoadingOverlay from 'layout/REUSABLE_COMPONENTS/system-utils/LoadingOverlay'; | ||
import { Route, Routes } from 'react-router-dom'; | ||
import PrivateRoute from 'layout/navigation/PrivateRoute'; | ||
import { ROUTE_CONFIG } from 'data/route-config'; | ||
import LoginDialog from 'pages/LoginDialog'; | ||
|
||
// ==============================|| APP ||============================== // | ||
const LazyRoute = ({ componentName, ...rest }) => { | ||
const Component = lazy(() => import(`./pages/${componentName}`)); | ||
return <Component {...rest} />; | ||
}; | ||
const App = () => { | ||
return <Main />; | ||
const { getCookie } = useManageCookies(); | ||
const { isLoggedIn } = getCookie(['isLoggedIn']); | ||
const { isConfiguratorOpen } = useConfigurator(); | ||
return ( | ||
<PageLayout | ||
sx={{ | ||
backgroundColor: '#3D3D3D', | ||
}} | ||
> | ||
<Navigation isLoggedIn={isLoggedIn} /> | ||
{isConfiguratorOpen && <Configurator />} | ||
<TransitionGroup component={null} exit={false}> | ||
<CSSTransition key={location.key} classNames="fade" timeout={300}> | ||
<Suspense fallback={<LoadingOverlay />}> | ||
<Routes> | ||
{ROUTE_CONFIG.routes.map( | ||
({ path, componentName, isPrivate }, index) => ( | ||
<Route | ||
key={index} | ||
path={path} | ||
element={ | ||
isPrivate ? ( | ||
<PrivateRoute> | ||
<LazyRoute componentName={componentName} /> | ||
</PrivateRoute> | ||
) : ( | ||
<LazyRoute componentName={componentName} /> | ||
) | ||
} | ||
/> | ||
) | ||
)} | ||
</Routes> | ||
</Suspense> | ||
</CSSTransition> | ||
</TransitionGroup> | ||
<LoginDialog /> | ||
</PageLayout> | ||
); | ||
}; | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.