diff --git a/src/App.js b/src/App.js
index 44b6da14b..5b6e7e97f 100644
--- a/src/App.js
+++ b/src/App.js
@@ -6,7 +6,7 @@ import Modal from 'react-modal';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCheck, faDizzy, faPlusCircle, faMinusCircle, faHome } from "@fortawesome/free-solid-svg-icons";
-import { selectDataset, getLastUpdated } from 'domain/dataset';
+import { selectDatasets, getLastUpdated } from 'domain/dataset';
import { setHierarchyConfig, showNodes, colorBy, selectControls } from 'domain/controls';
import { getError, clearError } from "domain/error";
@@ -32,8 +32,6 @@ class App extends Component {
showData: true,
showGrouping: false,
showFiltering: false,
- uuid1: uuidv4(),
- uuid2: uuidv4(),
}
toggleShowData = () =>{
@@ -83,7 +81,7 @@ class App extends Component {
}
render() {
- const { dataset, darkTheme, error, lastUpdated } = this.props;
+ const { dataset, darkTheme, error, lastUpdated, uuids } = this.props;
const hasDataset = dataset && dataset.length > 0;
const showData = this.state.showData;
@@ -114,11 +112,13 @@ class App extends Component {
-
-
-
-
+
+ { uuids.length > 1 &&
+
+
+
+ }
{ hasDataset &&
@@ -170,7 +170,7 @@ class App extends Component {
}
-
+
@@ -199,12 +199,15 @@ class App extends Component {
}
const mapStateToProps = state => {
- const owner = Object.keys(state.dataset.datasets)[0] || ""
+ const datasets = selectDatasets(state);
+ const uuids = Object.keys(datasets) || [uuidv4()];
+ const dataset = datasets[uuids[0]] && datasets[uuids[0]].dataset ? datasets[uuids[0]].dataset : [];
return {
- dataset: selectDataset(state, owner),
+ dataset: dataset,
darkTheme: selectControls(state).darkTheme,
error: getError(state),
- lastUpdated: getLastUpdated(state, owner),
+ lastUpdated: getLastUpdated(state, uuids[0]),
+ uuids: uuids
}
}
diff --git a/src/epics/load-dataset-epic.js b/src/epics/load-dataset-epic.js
index c5b59d39c..b575f2465 100644
--- a/src/epics/load-dataset-epic.js
+++ b/src/epics/load-dataset-epic.js
@@ -94,7 +94,6 @@ const formatPayload = (data) => {
const owner = data.owner;
const content = data.content;
const datasets = content.datasets;
- console.log(datasets);
const keyFields = content.keyFields || [];
const ignoredFields = content.ignoredFields || [];
const controls = content.controls || {};
diff --git a/src/features/dataset-controls/export.js b/src/features/dataset-controls/export.js
index 8bd432ba1..061169410 100644
--- a/src/features/dataset-controls/export.js
+++ b/src/features/dataset-controls/export.js
@@ -25,8 +25,6 @@ const sanitizeForExport = (datasets) =>{
delete item.CRVIZ;
});
});
- console.log("dataset without CRVIZ: %o", result);
- console.log("dataset with CRVIZ: %o", datasets);
return result;
}