mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-31 08:01:53 +00:00
Expose container via provider
This commit is contained in:
@@ -5,6 +5,7 @@ import pack from '../package.json';
|
||||
import { ErrorHandler } from './common/ErrorHandler';
|
||||
import { ScrollToTop } from './common/ScrollToTop';
|
||||
import { container } from './container';
|
||||
import { ContainerProvider } from './container/context';
|
||||
import { register as registerServiceWorker } from './serviceWorkerRegistration';
|
||||
import { setUpStore } from './store';
|
||||
import './tailwind.css';
|
||||
@@ -13,15 +14,17 @@ const store = setUpStore();
|
||||
const { App, appUpdateAvailable } = container;
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<Provider store={store}>
|
||||
<BrowserRouter basename={pack.homepage}>
|
||||
<ErrorHandler>
|
||||
<ScrollToTop>
|
||||
<App />
|
||||
</ScrollToTop>
|
||||
</ErrorHandler>
|
||||
</BrowserRouter>
|
||||
</Provider>,
|
||||
<ContainerProvider value={container}>
|
||||
<Provider store={store}>
|
||||
<BrowserRouter basename={pack.homepage}>
|
||||
<ErrorHandler>
|
||||
<ScrollToTop>
|
||||
<App />
|
||||
</ScrollToTop>
|
||||
</ErrorHandler>
|
||||
</BrowserRouter>
|
||||
</Provider>
|
||||
</ContainerProvider>,
|
||||
);
|
||||
|
||||
// Learn more about service workers: https://cra.link/PWA
|
||||
|
||||
Reference in New Issue
Block a user