Skip to content

Commit

Permalink
Hide comparison / charting buttons in sidebar if the other feature is…
Browse files Browse the repository at this point in the history
… currently active
  • Loading branch information
Thomas Cariello committed Jul 25, 2023
1 parent e0b1e1e commit 67bf854
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions web/js/containers/sidebar/footer-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,20 @@ const FooterContent = React.forwardRef((props, ref) => {
};

const renderLayersFooter = () => (
<>
<div className="product-buttons">
<div className="compare-chart-container">
<div className="product-buttons">
<CompareModeOptions
isActive={isCompareActive}
isMobile={isMobile}
selected={compareMode}
onclick={changeCompareMode}
/>
<ChartingModeOptions
isChartingActive={isChartingActive}
isMobile={isMobile}
/>
<div className="compare-chart-container">
{!isCompareActive
&& (
<Button
id="chart-toggle-button"
aria-label={chartBtnText}
Expand All @@ -72,6 +83,9 @@ const FooterContent = React.forwardRef((props, ref) => {
onClick={!isCompareActive && chartingModeAccessible ? onClickToggleCharting : null}
text={chartBtnText}
/>
)}
{!isChartingActive
&& (
<Button
id="compare-toggle-button"
aria-label={compareBtnText}
Expand All @@ -80,19 +94,9 @@ const FooterContent = React.forwardRef((props, ref) => {
onClick={!isChartingActive ? onClickToggleCompare : null}
text={compareBtnText}
/>
</div>
)}
</div>
<CompareModeOptions
isActive={isCompareActive}
isMobile={isMobile}
selected={compareMode}
onclick={changeCompareMode}
/>
<ChartingModeOptions
isChartingActive={isChartingActive}
isMobile={isMobile}
/>
</>
</div>
);

const renderEventsFooter = () => {
Expand Down

0 comments on commit 67bf854

Please sign in to comment.