aboutsummaryrefslogtreecommitdiff
path: root/modern/src/index.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-13 18:47:08 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-13 18:47:08 -0700
commiteb850b4a17fd0eb8e02668ed4330de5c88e79880 (patch)
tree028f0661ceaa16965fba6ed697f699d56b258993 /modern/src/index.js
parentd171ec4d0c6a40a47af7870c40d1657da2b511e8 (diff)
downloadtrackermap-web-eb850b4a17fd0eb8e02668ed4330de5c88e79880.tar.gz
trackermap-web-eb850b4a17fd0eb8e02668ed4330de5c88e79880.tar.bz2
trackermap-web-eb850b4a17fd0eb8e02668ed4330de5c88e79880.zip
Refactor server initialization
Diffstat (limited to 'modern/src/index.js')
-rw-r--r--modern/src/index.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/modern/src/index.js b/modern/src/index.js
index bfbb5efe..dbcd4c07 100644
--- a/modern/src/index.js
+++ b/modern/src/index.js
@@ -14,6 +14,7 @@ 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';
preloadImages();
@@ -26,11 +27,13 @@ ReactDOM.render(
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
<CssBaseline />
- <BrowserRouter basename={base}>
- <SocketController />
- <CachingController />
- <Navigation />
- </BrowserRouter>
+ <ServerProvider>
+ <BrowserRouter basename={base}>
+ <SocketController />
+ <CachingController />
+ <Navigation />
+ </BrowserRouter>
+ </ServerProvider>
<ErrorHandler />
<NativeInterface />
</ThemeProvider>