Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Re-initiate tour start when arriving via permalink to any step within a tour other than step 1

Jason Kent615129c75dc7
diff --git a/web/js/containers/tour.js b/web/js/containers/tour.js
index 31b656f83..42a9f1f5f 100644
--- a/web/js/containers/tour.js
+++ b/web/js/containers/tour.js
@@ -54,7 +54,14 @@ class Tour extends React.Component {
this.toggleModalComplete = this.toggleModalComplete.bind(this);
this.incrementStep = this.incrementStep.bind(this);
this.decreaseStep = this.decreaseStep.bind(this);
- if (currentStory && currentStoryIndex !== -1) this.fetchMetadata(currentStory, 0);
+ }
+
+ componentDidMount() {
+ const { currentStory, currentStoryIndex, currentStoryId } = this.state;
+ // If app loads with tour link at step other than 1, restart that tour story
+ if (currentStory && currentStoryIndex !== -1) {
+ this.selectTour(null, currentStory, 1, currentStoryId);
+ }
}
toggleModalStart(e) {