2019-11-09 22:56:46 +05:30
|
|
|
import React from 'react';
|
|
|
|
import { hot } from 'react-hot-loader/root';
|
|
|
|
import { Provider as ReduxProvider } from 'react-redux';
|
|
|
|
import { Router, Route, Switch } from 'react-router-dom';
|
2019-12-08 00:32:00 +05:30
|
|
|
import { IntlProvider } from 'app/components/i18n';
|
2019-12-07 16:58:52 +05:30
|
|
|
import { Store } from 'redux';
|
2019-12-08 00:32:00 +05:30
|
|
|
import AuthFlowRoute from 'app/containers/AuthFlowRoute';
|
|
|
|
import RootPage from 'app/pages/root/RootPage';
|
|
|
|
import SuccessOauthPage from 'app/pages/auth/SuccessOauthPage';
|
2019-11-09 22:56:46 +05:30
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
const App = ({
|
|
|
|
store,
|
|
|
|
browserHistory,
|
|
|
|
}: {
|
|
|
|
store: Store;
|
|
|
|
browserHistory: any;
|
|
|
|
}) => (
|
2019-11-27 14:33:32 +05:30
|
|
|
<ReduxProvider store={store}>
|
|
|
|
<IntlProvider>
|
|
|
|
<Router history={browserHistory}>
|
|
|
|
<Switch>
|
|
|
|
<Route path="/oauth2/code/success" component={SuccessOauthPage} />
|
|
|
|
<AuthFlowRoute
|
|
|
|
path="/oauth2/:version(v\d+)/:clientId?"
|
|
|
|
component={() => null}
|
|
|
|
/>
|
|
|
|
<Route path="/" component={RootPage} />
|
|
|
|
</Switch>
|
|
|
|
</Router>
|
|
|
|
</IntlProvider>
|
|
|
|
</ReduxProvider>
|
2019-11-09 22:56:46 +05:30
|
|
|
);
|
|
|
|
|
|
|
|
export default hot(App);
|