initial commit

This commit is contained in:
Stuart Taylor
2018-04-06 14:51:52 +01:00
committed by Mrugesh Mohapatra
parent 1314830576
commit 15aae9a57c
146 changed files with 44507 additions and 8380 deletions

View File

@ -1,7 +1,22 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
// You can delete this file if you're not using it
import { createStore } from './src/redux/store';
exports.replaceRouterComponent = ({ history }) => {
const store = createStore(history || {});
const ConnectedRouterWrapper = ({ children }) => (
<Provider store={store}>
<ConnectedRouter history={history}>{children}</ConnectedRouter>
</Provider>
);
ConnectedRouterWrapper.displayName = 'ConnectedRouterWrapper';
ConnectedRouterWrapper.propTypes = {
children: PropTypes.node
};
return ConnectedRouterWrapper;
};