diff options
author | Anton Tananaev <anton@traccar.org> | 2023-05-15 13:36:47 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-05-15 13:36:47 -0700 |
commit | 4aa5da9a669c58dbe43600e576bcfc0346c121a0 (patch) | |
tree | af7ac9d66354dfc26ca4e115c03c3ca0c1fbd8c6 /modern/src/index.js | |
parent | 474104189d270df752d8a177685c2ab413683b3a (diff) | |
download | trackermap-web-4aa5da9a669c58dbe43600e576bcfc0346c121a0.tar.gz trackermap-web-4aa5da9a669c58dbe43600e576bcfc0346c121a0.tar.bz2 trackermap-web-4aa5da9a669c58dbe43600e576bcfc0346c121a0.zip |
Make theme dynamic
Diffstat (limited to 'modern/src/index.js')
-rw-r--r-- | modern/src/index.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modern/src/index.js b/modern/src/index.js index e5457789..936fe7c1 100644 --- a/modern/src/index.js +++ b/modern/src/index.js @@ -3,17 +3,17 @@ import React from 'react'; import { createRoot } from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; import { Provider } from 'react-redux'; -import { CssBaseline, ThemeProvider, StyledEngineProvider } from '@mui/material'; +import { CssBaseline, StyledEngineProvider } from '@mui/material'; import store from './store'; import { LocalizationProvider } from './common/components/LocalizationProvider'; import ErrorHandler from './common/components/ErrorHandler'; -import theme from './common/theme'; import Navigation from './Navigation'; import preloadImages from './map/core/preloadImages'; import * as serviceWorkerRegistration from './serviceWorkerRegistration'; import NativeInterface from './common/components/NativeInterface'; import ServerProvider from './ServerProvider'; import ErrorBoundary from './ErrorBoundary'; +import AppThemeProvider from './AppThemeProvider'; preloadImages(); @@ -23,16 +23,17 @@ root.render( <Provider store={store}> <LocalizationProvider> <StyledEngineProvider injectFirst> - <ThemeProvider theme={theme}> - <CssBaseline /> - <ServerProvider> + <CssBaseline /> + <ServerProvider> + <AppThemeProvider> + <CssBaseline /> <BrowserRouter> <Navigation /> </BrowserRouter> - </ServerProvider> - <ErrorHandler /> - <NativeInterface /> - </ThemeProvider> + <ErrorHandler /> + <NativeInterface /> + </AppThemeProvider> + </ServerProvider> </StyledEngineProvider> </LocalizationProvider> </Provider> |