mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
[redux] move some redux utils to shared file (#1164)
* move some redux utils to shared file so they can be used in the new export view too * enhancer is a func now
This commit is contained in:
@@ -10,21 +10,15 @@ import TabbedSqlEditors from './components/TabbedSqlEditors';
|
||||
import QueryAutoRefresh from './components/QueryAutoRefresh';
|
||||
import Alerts from './components/Alerts';
|
||||
|
||||
import { bindActionCreators, compose, createStore } from 'redux';
|
||||
import { bindActionCreators, createStore } from 'redux';
|
||||
import { connect, Provider } from 'react-redux';
|
||||
|
||||
import { initialState, sqlLabReducer } from './reducers';
|
||||
import persistState from 'redux-localstorage';
|
||||
import { enhancer } from '../reduxUtils';
|
||||
|
||||
require('./main.css');
|
||||
|
||||
let enhancer = compose(persistState());
|
||||
if (process.env.NODE_ENV === 'dev') {
|
||||
enhancer = compose(
|
||||
persistState(), window.devToolsExtension && window.devToolsExtension()
|
||||
);
|
||||
}
|
||||
let store = createStore(sqlLabReducer, initialState, enhancer);
|
||||
let store = createStore(sqlLabReducer, initialState, enhancer());
|
||||
|
||||
// jquery hack to highlight the navbar menu
|
||||
$('a[href="/caravel/sqllab"]').parent().addClass('active');
|
||||
|
||||
Reference in New Issue
Block a user