diff --git a/client/src/components/leftsidebar.js b/client/src/components/leftsidebar.js index bda096e3..5b7a9709 100644 --- a/client/src/components/leftsidebar.js +++ b/client/src/components/leftsidebar.js @@ -1,19 +1,16 @@ // jshint esversion: 6 import React from "react"; -import _ from "lodash"; +import { connect } from "react-redux"; import Categorical from "./categorical/categorical"; import Continuous from "./continuous/continuous"; import ExpressionButtons from "./expression/expressionButtons"; -import { connect } from "react-redux"; import Heatmap from "./expression/diffExpHeatmap"; import * as globals from "../globals"; import DynamicScatterplot from "./scatterplot/scatterplot"; -@connect(state => { - return { - responsive: state.responsive - }; -}) +@connect(state => ({ + responsive: state.responsive +})) class LeftSideBar extends React.Component { constructor(props) { super(props); @@ -21,10 +18,16 @@ class LeftSideBar extends React.Component { currentTab: "metadata" }; } + render() { - /* this magic number should be made less fragile, if cellxgene logo or tabs change, this must as well */ - const metadataSectionPadding = - this.state.currentTab === "metadata" ? 88 : 450; + const { currentTab } = this.state; + const { responsive } = this.props; + + /* + this magic number should be made less fragile, + if cellxgene logo or tabs change, this must as well + */ + const metadataSectionPadding = currentTab === "metadata" ? 88 : 450; return (
- cellxgene {globals.datasetTitle}{" "} + cellxgene + {globals.datasetTitle}{" "}