这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ When adding a new feature, it is recommended to add corresponding tests too.

Tests are written using [Cypress](https://www.cypress.io/).

You can use the [Redux DevTools Extension](http://extension.remotedev.io/) to inspect and debug the Redux store.
It should automatically connect to the Redux store when started in development mode.

### Run Tests

- Run tests: `npm run cypress`
Expand Down
10 changes: 7 additions & 3 deletions console/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ import globals from './Globals';
let _finalCreateStore;

if (__DEVELOPMENT__) {
_finalCreateStore = compose(
const tools = [
applyMiddleware(thunk, routerMiddleware(browserHistory), createLogger()),
require('redux-devtools').persistState(
window.location.href.match(/[?&]debug_session=([^&]+)\b/)
)
)(createStore);
),
];
if (typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION__) {
tools.push(window.__REDUX_DEVTOOLS_EXTENSION__());
}
_finalCreateStore = compose(...tools)(createStore);
} else {
_finalCreateStore = compose(
applyMiddleware(thunk, routerMiddleware(browserHistory))
Expand Down