Merge pull request #2644 from nestordominguez/bug-2171
Add loading animation to search page
This commit is contained in:
commit
24cfe53165
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ import Button from 'component/button';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
search: string => void,
|
search: string => void,
|
||||||
|
isSearching: boolean,
|
||||||
location: UrlLocation,
|
location: UrlLocation,
|
||||||
uris: Array<string>,
|
uris: Array<string>,
|
||||||
onFeedbackNegative: string => void,
|
onFeedbackNegative: string => void,
|
||||||
|
@ -17,7 +18,7 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function SearchPage(props: 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 urlParams = new URLSearchParams(location.search);
|
||||||
const urlQuery = urlParams.get('q');
|
const urlQuery = urlParams.get('q');
|
||||||
const isValid = isURIValid(urlQuery);
|
const isValid = isURIValid(urlQuery);
|
||||||
|
@ -50,6 +51,7 @@ export default function SearchPage(props: Props) {
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<ClaimList
|
<ClaimList
|
||||||
uris={uris}
|
uris={uris}
|
||||||
|
loading={isSearching}
|
||||||
header={<SearchOptions />}
|
header={<SearchOptions />}
|
||||||
headerAltControls={
|
headerAltControls={
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
|
Loading…
Reference in a new issue