2019-12-09 12:37:07 +05:30
|
|
|
import React from 'react';
|
|
|
|
import { Provider as ReduxProvider } from 'react-redux';
|
|
|
|
import { Router } from 'react-router-dom';
|
2019-12-30 12:59:39 +05:30
|
|
|
import { HelmetProvider } from 'react-helmet-async';
|
2019-12-09 12:37:07 +05:30
|
|
|
import { IntlProvider } from 'app/components/i18n';
|
|
|
|
import { Store } from 'app/reducers';
|
|
|
|
|
|
|
|
function ContextProvider({
|
|
|
|
children,
|
|
|
|
store,
|
|
|
|
history,
|
|
|
|
}: {
|
|
|
|
children: React.ReactNode;
|
|
|
|
store: Store;
|
|
|
|
history: any;
|
|
|
|
}) {
|
|
|
|
return (
|
2019-12-30 12:59:39 +05:30
|
|
|
<HelmetProvider>
|
|
|
|
<ReduxProvider store={store}>
|
|
|
|
<IntlProvider>
|
|
|
|
<Router history={history}>{children}</Router>
|
|
|
|
</IntlProvider>
|
|
|
|
</ReduxProvider>
|
|
|
|
</HelmetProvider>
|
2019-12-09 12:37:07 +05:30
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ContextProvider;
|