diff --git a/src/actions/Concepts/conceptActions.js b/src/actions/Concepts/conceptActions.js index 64489856..07927850 100644 --- a/src/actions/Concepts/conceptActions.js +++ b/src/actions/Concepts/conceptActions.js @@ -25,13 +25,13 @@ export const setSelectedConceptAndRedirect = (concept, props) => { dispatch(setSelectedConcept(concept)); switch (concept.type) { case "cell_type": - props.history.push('/explorer/celltypesummary'); + window.open('/explorer/celltypesummary', '_self'); break; case "gene": - props.history.push('/explorer/genesummary'); + window.open('/explorer/genesummary', '_self'); break; default: - props.history.push('/explorer'); + window.open('/explorer', '_self'); } } }; diff --git a/src/actions/DataType/dataTypeActions.js b/src/actions/DataType/dataTypeActions.js index 9d317308..34945314 100644 --- a/src/actions/DataType/dataTypeActions.js +++ b/src/actions/DataType/dataTypeActions.js @@ -28,15 +28,15 @@ export const setDataTypeAndRedirect = (dataType, props) => { switch (dataType) { case "sn": dispatch(setDataType(dataType)); - props.history.push('/explorer/dataviz'); + window.open('/explorer/dataviz', '_self'); break; case "sc": dispatch(setDataType(dataType)); - props.history.push('/explorer/dataviz'); + window.open('/explorer/dataviz', '_self'); break; case "rt": dispatch(setDataType(dataType)); - props.history.push('/explorer/regionalviz'); + window.open('/explorer/regionalviz', '_self'); break; case "wsi": window.open('/spatial-viewer/?size=n_1000_n&filters%5B0%5D%5Bfield%5D=datatype&filters%5B0%5D%5Bvalues%5D%5B0%5D=Light%20Microscopic%20Whole%20Slide%20Images&filters%5B0%5D%5Btype%5D=any', '_self') @@ -60,7 +60,7 @@ export const setDataTypeAndRedirect = (dataType, props) => { window.open('https://metaspace2020.eu/datasets?prj=8f102fc4-62a8-11ec-89bf-bba413a122a2&q=_glyc', '_blank'); break default: - props.history.push('/explorer/'); + window.open('/explorer/', '_self'); } } } diff --git a/src/components/DataViz/DataTypeSelectorContainer.js b/src/components/DataViz/DataTypeSelectorContainer.js index d57edbb7..3b200a70 100644 --- a/src/components/DataViz/DataTypeSelectorContainer.js +++ b/src/components/DataViz/DataTypeSelectorContainer.js @@ -20,9 +20,9 @@ const mapDispatchToProps = (dispatch, props) => setDataType(dataType) { dispatch(setDataType(dataType)); if (dataType === 'rt') { - dispatch((dispatch) => props.history.push("/explorer/regionalviz")); + dispatch((dispatch) => window.open("/explorer/regionalviz", "_self")); } else if (dataType === 'sc' || dataType === 'sn') { - dispatch((dispatch) => props.history.push("/explorer/dataViz")); + dispatch((dispatch) => window.open("/explorer/dataViz", "_self")); } } diff --git a/src/components/DataViz/RNASeqViz.js b/src/components/DataViz/RNASeqViz.js index ca9ad54f..f236f52a 100644 --- a/src/components/DataViz/RNASeqViz.js +++ b/src/components/DataViz/RNASeqViz.js @@ -17,7 +17,7 @@ class RNASeqViz extends Component { if (queryParam && queryParam.dataType) { props.resetState(); props.setDataType(queryParam.dataType); - props.history.push(props.location.pathname); + window.open(props.location.pathname, '_self'); this.setState({isLoading: false, isLoadingUmap: false}) } diff --git a/src/components/DataViz/RegionalViz.js b/src/components/DataViz/RegionalViz.js index c774f47c..a677681b 100644 --- a/src/components/DataViz/RegionalViz.js +++ b/src/components/DataViz/RegionalViz.js @@ -23,7 +23,7 @@ class RegionalViz extends Component { if (queryParam && queryParam.dataType) { this.props.resetState(); props.setDataType('rt'); - props.history.push(props.location.pathname); + window.open(props.location.pathname, '_self'); } }; diff --git a/src/components/ExpressionTables/DiffexByClusterContainer.js b/src/components/ExpressionTables/DiffexByClusterContainer.js index db2408ba..5481a616 100644 --- a/src/components/ExpressionTables/DiffexByClusterContainer.js +++ b/src/components/ExpressionTables/DiffexByClusterContainer.js @@ -16,9 +16,9 @@ const mapDispatchToProps = (dispatch, props) => setGene(gene, dataType) { dispatch(setGene(gene)); if (dataType === 'rt') { - dispatch((dispatch) => props.history.push("/explorer/regionalviz")); + dispatch((dispatch) => window.open("/explorer/regionalviz", '_self')); } else { - dispatch((dispatch) => props.history.push("/explorer/dataviz")); + dispatch((dispatch) => window.open("/explorer/dataviz", '_self')); } }, setDataType(dataType) { diff --git a/src/components/Summary/CellTypeSummary.js b/src/components/Summary/CellTypeSummary.js index df417deb..f4c53a59 100644 --- a/src/components/Summary/CellTypeSummary.js +++ b/src/components/Summary/CellTypeSummary.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Container, Row, Col } from 'reactstrap'; -import { Grid, TableFixedColumns, TableColumnResizing, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; +import { Grid, TableColumnResizing, TableHeaderRow, Table} from '@devexpress/dx-react-grid-bootstrap4'; import ConceptSelectFullWidth from '../ConceptSelect/ConceptSelectFullWidth'; import { fetchClusterHierarchy } from '../../helpers/ApolloClient'; import { Spinner } from "reactstrap"; diff --git a/src/components/Summary/CellTypeSummaryContainer.js b/src/components/Summary/CellTypeSummaryContainer.js index 9641b307..6a73e5a0 100644 --- a/src/components/Summary/CellTypeSummaryContainer.js +++ b/src/components/Summary/CellTypeSummaryContainer.js @@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch, props) => dispatch(setDataType(dataType)); dispatch(setTissueType("all")); dispatch(setCluster(cluster)); - dispatch((dispatch) => props.history.push("/explorer/diffex")); + dispatch((dispatch) => window.open("/explorer/diffex", '_self')); } });