diff --git a/embark-ui/src/components/Layout.js b/embark-ui/src/components/Layout.js
index fd16b21df..f7a204d12 100644
--- a/embark-ui/src/components/Layout.js
+++ b/embark-ui/src/components/Layout.js
@@ -66,15 +66,19 @@ class Layout extends React.Component {
constructor(props) {
super(props);
- this.state = {loading: false};
+ this.state = {
+ searchLoading: false,
+ searchError: false
+ };
}
shouldComponentUpdate(nextProps) {
if (nextProps.searchResult && Object.keys(nextProps.searchResult).length &&
nextProps.searchResult !== this.props.searchResult) {
- this.setState({loading: false});
+ this.setState({searchLoading: false});
if (nextProps.searchResult.error) {
+ this.setState({searchError: true});
return true;
}
@@ -101,7 +105,11 @@ class Layout extends React.Component {
searchTheExplorer(value) {
this.props.explorerSearch(value);
- this.setState({loading: true});
+ this.setState({searchLoading: true});
+ }
+
+ closeSearchError() {
+ this.setState({searchError: false});
}
renderNav() {
@@ -120,11 +128,10 @@ class Layout extends React.Component {
}
renderRightNav() {
- const searchResult = this.props.searchResult;
+ // {searchResult.error &&