mirror of
https://github.com/apache/superset.git
synced 2026-04-13 21:24:28 +00:00
* bumping the js libs * New linting rules * More linting * More * Done linting * npm >=4.5.0 * Bumping node * Tweaking the build * Fixing the damn build * Fixing the apps
33 lines
1022 B
JavaScript
33 lines
1022 B
JavaScript
import React from 'react';
|
|
import { render } from 'react-dom';
|
|
import { createStore, compose, applyMiddleware } from 'redux';
|
|
import { Provider } from 'react-redux';
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import { getInitialState, sqlLabReducer } from './reducers';
|
|
import { initEnhancer } from '../reduxUtils';
|
|
import { initJQueryAjaxCSRF } from '../modules/utils';
|
|
import App from './components/App';
|
|
import { appSetup } from '../common';
|
|
import './main.css';
|
|
|
|
appSetup();
|
|
initJQueryAjaxCSRF();
|
|
|
|
const appContainer = document.getElementById('app');
|
|
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
|
|
const state = Object.assign({}, getInitialState(bootstrapData.defaultDbId), bootstrapData);
|
|
|
|
const store = createStore(
|
|
sqlLabReducer, state, compose(applyMiddleware(thunkMiddleware), initEnhancer()));
|
|
|
|
// jquery hack to highlight the navbar menu
|
|
$('a:contains("SQL Lab")').parent().addClass('active');
|
|
|
|
render(
|
|
<Provider store={store}>
|
|
<App />
|
|
</Provider>,
|
|
appContainer,
|
|
);
|