mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
31
scm-ui/ui-webapp/src/index.tsx
Normal file
31
scm-ui/ui-webapp/src/index.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Index from './containers/Index';
|
||||
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import i18n from './i18n';
|
||||
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import createReduxStore from './createReduxStore';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
|
||||
import { urls } from '@scm-manager/ui-components';
|
||||
|
||||
const store = createReduxStore();
|
||||
|
||||
const root = document.getElementById('root');
|
||||
if (!root) {
|
||||
throw new Error('could not find root element');
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<Router basename={urls.contextPath}>
|
||||
<Index />
|
||||
</Router>
|
||||
</I18nextProvider>
|
||||
</Provider>,
|
||||
root,
|
||||
);
|
||||
Reference in New Issue
Block a user