updated createStore to handle browsers with no webtools

This commit is contained in:
bill bittner 2018-02-07 08:28:43 -08:00
parent dbcf4e4c46
commit d809173b00
3 changed files with 10 additions and 13 deletions

View file

@ -6,11 +6,6 @@ class AssetDisplay extends React.Component {
componentDidMount () {
this.props.onFileRequest(this.props.claimData.name, this.props.claimData.claimId);
}
componentWillReceiveProps (nextProps) {
// if (nextProps.name !== this.props.name && nextProps.claimId !== this.props.claimId) {
// this.props.onCheckServerForFile(nextProps.name, nextProps.claimId);
// }
}
render () {
const status = this.props.status;
const error = this.props.error;

View file

@ -2,14 +2,14 @@ import { connect } from 'react-redux';
import { updateChannelClaimsData } from 'actions/show';
import View from './view';
const mapStateToProps = ({ show }) => {
const mapStateToProps = ({ show : { showChannel: { channelData, channelClaimsData } } }) => {
return {
name : show.showChannel.channelData.name,
longId : show.showChannel.channelData.longId,
claims : show.showChannel.channelClaimsData.claims,
currentPage: show.showChannel.channelClaimsData.currentPage,
totalPages : show.showChannel.channelClaimsData.totalPages,
totalClaims: show.showChannel.channelClaimsData.totalClaims,
name : channelData.name,
longId : channelData.longId,
claims : channelClaimsData.claims,
currentPage: channelClaimsData.currentPage,
totalPages : channelClaimsData.totalPages,
totalClaims: channelClaimsData.totalClaims,
};
};

View file

@ -9,9 +9,11 @@ import Root from './root';
const sagaMiddleware = createSagaMiddleware();
const middleware = applyMiddleware(sagaMiddleware);
const enhancer = window.__REDUX_DEVTOOLS_EXTENSION__ ? compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__()) : middleware;
let store = createStore(
Reducer,
compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()),
enhancer,
);
sagaMiddleware.run(rootSaga);