diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1229543..c13b70a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- You can now click a button in the search bar to search (you can also still just prss enter, of course).
+
### Changed
### Deprecated
diff --git a/frontend/src/components/screens/SearchScreen.tsx b/frontend/src/components/screens/SearchScreen.tsx
index 2876a72..6addd17 100644
--- a/frontend/src/components/screens/SearchScreen.tsx
+++ b/frontend/src/components/screens/SearchScreen.tsx
@@ -1,4 +1,4 @@
-import { Button, Callout, Classes, H2, Intent, NonIdealState, Spinner } from "@blueprintjs/core";
+import { Button, Callout, H2, InputGroup, Intent, NonIdealState, Spinner } from "@blueprintjs/core";
import { IconNames } from "@blueprintjs/icons";
import { push } from "connected-react-router";
import React from "react";
@@ -60,24 +60,19 @@ class SearchScreen extends React.PureComponent;
+ content = ;
} else if (!isLoadingResults && query && results.length === 0) {
- return (
+ content = (
);
- }
-
- return (
-
- {isSmallScreen && results.length === 0 && this.renderMobileWarning()}
- Find an instance
- {this.renderSearchBar()}
+ } else if (!!results && results.length > 0) {
+ content = (
{results.map(result => (
)}
+ );
+ }
+
+ let rightSearchBarElement;
+ if (isLoadingResults) {
+ rightSearchBarElement = ;
+ } else if (query) {
+ rightSearchBarElement = ;
+ } else {
+ rightSearchBarElement = (
+
+ );
+ }
+
+ return (
+
+ {isSmallScreen && results.length === 0 && this.renderMobileWarning()}
+ Find an instance
+
+
+
+ {content}
);
}
@@ -113,6 +139,11 @@ class SearchScreen extends React.PureComponent {
+ this.setState({ currentQuery: "" });
+ this.props.handleSearch("");
+ };
+
private selectInstanceFactory = (domain: string) => () => {
this.props.setIsHoveringOver(undefined);
this.props.navigateToInstance(domain);
@@ -126,21 +157,6 @@ class SearchScreen extends React.PureComponent (
-
-
-
-
- );
-
private renderMobileWarning = () => (