Skip to content

Commit

Permalink
hide surface water extent story in tour story box
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanweiler92 committed Jan 11, 2024
1 parent c2c5987 commit 0f86cc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/js/components/tour/tour-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class TourBox extends React.Component {
} = this.props;
const { styles } = this.state;
let floatBox = '';
if (storyOrder.length - (index + 1) === 0
|| storyOrder.length - (index + 2) === 0) {
if (storyOrder.length - (index + 2) === 0
|| storyOrder.length - (index + 3) === 0) {
floatBox = ' tour-box-float';
}
return (
Expand Down
4 changes: 3 additions & 1 deletion web/js/components/tour/tour-boxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import TourBox from './tour-box';

function TourBoxes(props) {
const { stories, storyOrder, selectTour } = props;
// when we remove this we need to update tour-box.js render function to index+1 && index+2
const activeStoryOrder = storyOrder.filter((storyId) => storyId !== 'surface_water_extent');
return (
<div className="tour-box-container">
<div className="tour-box-row">
{storyOrder.map((storyId, i) => {
{activeStoryOrder.map((storyId, i) => {
const story = stories[storyId];
return (
<TourBox
Expand Down

0 comments on commit 0f86cc4

Please sign in to comment.