Do not use persistState for explorev2 (#1894)

* Do not use persistState for explorev2

* Change enhancerWithPersistState to enhancer and function name to initEnhancer
This commit is contained in:
vera-liu
2017-01-03 20:23:43 -08:00
committed by GitHub
parent a1e3fc1c23
commit 9bc7ad9cd5
3 changed files with 8 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ require('bootstrap');
import React from 'react';
import { render } from 'react-dom';
import { getInitialState, sqlLabReducer } from './reducers';
import { enhancer } from '../reduxUtils';
import { initEnhancer } from '../reduxUtils';
import { createStore, compose, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
@@ -20,7 +20,7 @@ const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
const state = Object.assign({}, getInitialState(bootstrapData.defaultDbId), bootstrapData);
let store = createStore(
sqlLabReducer, state, compose(applyMiddleware(thunkMiddleware), enhancer()));
sqlLabReducer, state, compose(applyMiddleware(thunkMiddleware), initEnhancer()));
// jquery hack to highlight the navbar menu
$('a:contains("SQL Lab")').parent().addClass('active');