Files
superset2/superset/assets/javascripts/explorev2/index.jsx
Maxime Beauchemin 15b67b2c6c [WiP] rename project from Caravel to Superset (#1576)
* Change in files

* Renamin files and folders

* cleaning up a single piece of lint

* Removing boat picture from docs

* add superset word mark

* Update rename note in docs

* Fixing images

* Pinning datatables

* Fixing issues with mapbox-gl

* Forgot to rename one file

* Linting

* v0.13.0

* adding pyyaml to dev-reqs
2016-11-09 23:08:22 -08:00

33 lines
1.0 KiB
JavaScript

import React from 'react';
import ReactDOM from 'react-dom';
import ExploreViewContainer from './components/ExploreViewContainer';
import { createStore, applyMiddleware, compose } from 'redux';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
import { initialState } from './stores/store';
const exploreViewContainer = document.getElementById('js-explore-view-container');
const bootstrapData = JSON.parse(exploreViewContainer.getAttribute('data-bootstrap'));
import { exploreReducer } from './reducers/exploreReducer';
const bootstrappedState = Object.assign(initialState, {
can_download: bootstrapData.can_download,
datasources: bootstrapData.datasources,
datasource_id: parseInt(bootstrapData.datasource_id, 10),
datasource_type: bootstrapData.datasource_type,
viz: bootstrapData.viz,
});
const store = createStore(exploreReducer, bootstrappedState,
compose(applyMiddleware(thunk))
);
ReactDOM.render(
<Provider store={store}>
<ExploreViewContainer />
</Provider>,
exploreViewContainer
);