-
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.
Merge pull request #28 from reedoooo/styles/finalize
This commit encompasses a series of significant updates and optimizat…
- Loading branch information
Showing
511 changed files
with
47,052 additions
and
18,080 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": [ | ||
"development" | ||
], | ||
"hints": { | ||
"compat-api/css": [ | ||
"default", | ||
{ | ||
"ignore": [ | ||
"backdrop-filter" | ||
] | ||
} | ||
] | ||
} | ||
} |
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,2 +1 @@ | ||
{ | ||
} | ||
{} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,94 @@ | ||
// App.js | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import './assets/css/index.css'; | ||
import Main from './Main'; | ||
import WithPageProvider from './context/WithPageProvider'; | ||
import { | ||
FormProvider, | ||
ModalProvider, | ||
PopoverProvider, | ||
UserProvider, | ||
useMode, | ||
CollectionProvider, | ||
CardProvider, | ||
DeckProvider, | ||
CartProvider, | ||
CardImagesProvider, | ||
ChartProvider, | ||
StatisticsProvider, | ||
SidebarProvider, | ||
AppContextProvider, | ||
useAuthContext, | ||
usePageContext, | ||
ErrorBoundary, | ||
ConfiguratorProvider, | ||
VisibilityProvider, | ||
} from './context'; | ||
import { ThemeProvider } from 'styled-components'; | ||
import { SnackbarProvider, useSnackbar } from 'notistack'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { CssBaseline, GlobalStyles } from '@mui/material'; | ||
import { ParallaxProvider } from 'react-scroll-parallax'; | ||
import { useLoading } from './context/hooks/useLoading'; | ||
|
||
// Call the higher-order component function outside the component function | ||
// to avoid remounting on every render | ||
const WrappedMain = WithPageProvider(Main); | ||
// ==============================|| APP ||============================== // | ||
|
||
const App = () => { | ||
return <WrappedMain />; | ||
const { theme } = useMode(); | ||
const navigate = useNavigate(); | ||
const { resetLogoutTimer, logout, authUser, userId, isLoggedIn } = | ||
useAuthContext(); | ||
const { returnDisplay } = usePageContext(); | ||
const { isLoading, isPageLoading, error } = useLoading(); | ||
|
||
// useEffect(() => { | ||
// if (!isLoggedIn && !isPageLoading) navigate('/login'); | ||
// }, [isLoggedIn, navigate, isPageLoading]); | ||
if (isPageLoading || error) { | ||
return returnDisplay(); | ||
} | ||
return ( | ||
<ErrorBoundary> | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<GlobalStyles /> | ||
<ParallaxProvider> | ||
<ConfiguratorProvider> | ||
<VisibilityProvider> | ||
<FormProvider> | ||
<UserProvider> | ||
<ModalProvider> | ||
<SnackbarProvider> | ||
<PopoverProvider> | ||
<CollectionProvider> | ||
<CardProvider> | ||
<DeckProvider> | ||
<CartProvider> | ||
<CardImagesProvider> | ||
<ChartProvider> | ||
<StatisticsProvider> | ||
<SidebarProvider> | ||
<AppContextProvider> | ||
<Main /> | ||
</AppContextProvider> | ||
</SidebarProvider> | ||
</StatisticsProvider> | ||
</ChartProvider> | ||
</CardImagesProvider> | ||
</CartProvider> | ||
</DeckProvider> | ||
</CardProvider> | ||
</CollectionProvider> | ||
</PopoverProvider> | ||
</SnackbarProvider> | ||
</ModalProvider> | ||
</UserProvider> | ||
</FormProvider> | ||
</VisibilityProvider> | ||
</ConfiguratorProvider> | ||
</ParallaxProvider> | ||
</ThemeProvider> | ||
</ErrorBoundary> | ||
); | ||
}; | ||
|
||
export default App; |
Oops, something went wrong.