accounts-frontend/packages/app/shell/ContextProvider.tsx
ErickSkrauch 82abe0a746
Extract general popups markup to its own component
Split popups controllers into separate components
Implemented storybooks for all project's popups
2020-07-06 19:29:56 +03:00

27 lines
759 B
TypeScript

import React, { ComponentType } from 'react';
import { Provider as ReduxProvider } from 'react-redux';
import { Router } from 'react-router-dom';
import { HelmetProvider } from 'react-helmet-async';
import { History } from 'history';
import { IntlProvider } from 'app/components/i18n';
import { Store } from 'app/reducers';
interface Props {
children: React.ReactNode;
store: Store;
history: History;
}
const ContextProvider: ComponentType<Props> = ({ children, store, history }) => (
<HelmetProvider>
<ReduxProvider store={store}>
<IntlProvider>
<Router history={history}>{children}</Router>
</IntlProvider>
</ReduxProvider>
</HelmetProvider>
);
export default ContextProvider;