Merge pull request #2644 from nestordominguez/bug-2171

Add loading animation to search page
This commit is contained in:
Sean Yesmunt 2019-07-21 16:53:56 -04:00 committed by GitHub
commit 24cfe53165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ import Button from 'component/button';
type Props = {
search: string => void,
isSearching: boolean,
location: UrlLocation,
uris: Array<string>,
onFeedbackNegative: string => void,
@ -17,7 +18,7 @@ type Props = {
};
export default function SearchPage(props: Props) {
const { search, uris, onFeedbackPositive, onFeedbackNegative, location } = props;
const { search, uris, onFeedbackPositive, onFeedbackNegative, location, isSearching } = props;
const urlParams = new URLSearchParams(location.search);
const urlQuery = urlParams.get('q');
const isValid = isURIValid(urlQuery);
@ -50,6 +51,7 @@ export default function SearchPage(props: Props) {
<div className="card">
<ClaimList
uris={uris}
loading={isSearching}
header={<SearchOptions />}
headerAltControls={
<Fragment>