colby-react-web-documentation-tool
Version:
A tool to build website documentation automatically from an organization's GitHub README.md files
36 lines (28 loc) • 806 B
JavaScript
import PropTypes from 'prop-types';
import React from 'react';
import { createStore, applyMiddleware } from 'redux';
import { createLogger } from 'redux-logger';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import App from './components/app';
import rootReducer from './reducers';
const Documentation = ({ organization }) => {
const middlewares = [thunkMiddleware];
if (window.location.href.indexOf('localhost') !== -1) {
middlewares.push(createLogger());
}
const store = createStore(
rootReducer,
{ organization },
applyMiddleware(...middlewares)
);
return (
<Provider store={store}>
<App />
</Provider>
);
};
Documentation.propTypes = {
organization: PropTypes.string.isRequired,
};
export default Documentation;