Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Remove breadcrumb in smaller windows #1480

Benjamin King2c2852e2d9c5
diff --git a/web/js/components/layer/header.js b/web/js/components/layer/header.js
index 413071cd6..170133c22 100644
--- a/web/js/components/layer/header.js
+++ b/web/js/components/layer/header.js
@@ -36,11 +36,18 @@ class ProductPickerHeader extends React.Component {
}
render() {
const isAutoFocus = !util.browser.touchDevice;
- const { modalView, selectedProjection, listType, category } = this.props;
+ const {
+ modalView,
+ selectedProjection,
+ listType,
+ category,
+ width
+ } = this.props;
const isBreadCrumb =
!modalView &&
selectedProjection === 'geographic' &&
- listType !== 'category';
+ listType !== 'category' &&
+ width > 650;
const isSearching = listType === 'search';
const BackButton = (
<Button
@@ -100,7 +107,8 @@ ProductPickerHeader.propTypes = {
selectedProjection: PropTypes.string,
listType: PropTypes.string,
category: PropTypes.object,
- updateListState: PropTypes.func
+ updateListState: PropTypes.func,
+ width: PropTypes.number
};
export default ProductPickerHeader;
diff --git a/web/js/components/layer/product-picker.js b/web/js/components/layer/product-picker.js
index cf4e8a042..02b4c9b73 100644
--- a/web/js/components/layer/product-picker.js
+++ b/web/js/components/layer/product-picker.js
@@ -171,6 +171,7 @@ class ProductPicker extends React.Component {
inputValue={inputValue}
category={category}
modalView={modalView}
+ width={width}
runSearch={this.runSearch.bind(this)}
updateListState={str => {
this.setState({ listType: str, inputValue: '' });