Interactive interface for browsing global, full-resolution satellite imagery
remove window location origin and path from config paths
Ed Platoa12950ef722c
diff --git a/web/js/components/layer/product-picker/list.js b/web/js/components/layer/product-picker/list.jsindex 1589dbd72..e6dfe36b4 100644--- a/web/js/components/layer/product-picker/list.js+++ b/web/js/components/layer/product-picker/list.js@@ -50,9 +50,8 @@ class LayerList extends React.Component {this.setState({ expandedMetadataLayers: expandedMetadataLayers });var layer = filteredRows.find(l => l.id === layerId);if (!layer.metadata) {- var { origin, pathname } = window.location;var errorMessage = '<p>There was an error loading layer metadata.</p>';- var uri = `${origin}${pathname}config/metadata/layers/${+ var uri = `config/metadata/layers/${layer.description}.html`;fetch(uri)diff --git a/web/js/components/tour/tour-box.js b/web/js/components/tour/tour-box.jsindex 33603245d..83afedec3 100644--- a/web/js/components/tour/tour-box.js+++ b/web/js/components/tour/tour-box.js@@ -14,9 +14,8 @@ class TourBox extends React.Component {UNSAFE_componentWillMount() {if (this.props.backgroundImage) {- const { origin, pathname } = window.location;this.setState({- styles: { backgroundImage: `url(${origin}${pathname}config/metadata/stories/${this.props.storyId}/${this.props.backgroundImage})` }+ styles: { backgroundImage: `url(config/metadata/stories/${this.props.storyId}/${this.props.backgroundImage})` }});}}@@ -24,9 +23,8 @@ class TourBox extends React.Component {onMouseOver(e) {e.preventDefault();if (this.props.backgroundImageHover) {- const { origin, pathname } = window.location;this.setState({- styles: { backgroundImage: `url(${origin}${pathname}config/metadata/stories/${this.props.storyId}/${this.props.backgroundImageHover})` }+ styles: { backgroundImage: `url(config/metadata/stories/${this.props.storyId}/${this.props.backgroundImageHover})` }});}}@@ -34,9 +32,8 @@ class TourBox extends React.Component {onMouseOut(e) {e.preventDefault();if (this.props.backgroundImage) {- const { origin, pathname } = window.location;this.setState({- styles: { backgroundImage: `url(${origin}${pathname}config/metadata/stories/${this.props.storyId}/${this.props.backgroundImage})` }+ styles: { backgroundImage: `url(config/metadata/stories/${this.props.storyId}/${this.props.backgroundImage})` }});}}diff --git a/web/js/containers/tour.js b/web/js/containers/tour.jsindex c1a96fc09..3ef3f6d80 100644--- a/web/js/containers/tour.js+++ b/web/js/containers/tour.js@@ -110,9 +110,8 @@ class Tour extends React.Component {fetchMetadata(currentStory, stepIndex) {var description = currentStory.steps[stepIndex].description;- var { origin, pathname } = window.location;var errorMessage = '<p>There was an error loading this description.</p>';- var uri = `${origin}${pathname}config/metadata/stories/${+ var uri = `config/metadata/stories/${currentStory.id}/${description}`;this.setState({