Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Use es6 str template for bg imgs #1456

Benjamin King81abc2efbf98
diff --git a/web/js/components/layer/category.js b/web/js/components/layer/category.js
index e57b733c5..78cdc9ec3 100644
--- a/web/js/components/layer/category.js
+++ b/web/js/components/layer/category.js
@@ -15,9 +15,12 @@ class Category extends React.Component {
hasMeasurementSource,
categoryType
} = this.props;
- const categoryBgImage = category.image
+ const bgImage = category.image
+ ? 'images/wv.layers/categories/' + category.image
+ : '';
+ const categoryBgImage = bgImage
? {
- backgroundImage: 'url("images/wv.layers/categories/' + category.image
+ backgroundImage: `url(${bgImage})`
}
: {};