add search results disclaimer

This commit is contained in:
Sean Yesmunt 2018-05-15 22:32:13 -04:00
parent 2fe2cbacee
commit 9161ba1a62
4 changed files with 7 additions and 3 deletions

View file

@ -35,6 +35,7 @@
}],
"func-names": ["warn", "as-needed"],
"jsx-a11y/label-has-for": 0,
"import/prefer-default-export": 0
"import/prefer-default-export": 0,
"no-return-assign": 0
}
}

View file

@ -81,7 +81,7 @@ class FileListSearch extends React.PureComponent<Props> {
<div className="search-result__column">
<div className="file-list__header">{__('Your downloads')}</div>
{downloadUris && downloadUris.length ? (
downloadUris.map(uri => <FileTile test key={uri} uri={uri} />)
downloadUris.map(uri => <FileTile hideNoResult key={uri} uri={uri} />)
) : (
<NoResults />
)}

View file

@ -30,6 +30,7 @@ type Props = {
navigate: (string, ?{}) => void,
clearPublish: () => void,
updatePublishForm: ({}) => void,
hideNoResult: boolean, // don't show the tile if there is no claim at this uri
};
class FileTile extends React.PureComponent<Props> {
@ -62,6 +63,7 @@ class FileTile extends React.PureComponent<Props> {
isDownloaded,
clearPublish,
updatePublishForm,
hideNoResult,
} = this.props;
const uri = normalizeURI(this.props.uri);
@ -80,7 +82,7 @@ class FileTile extends React.PureComponent<Props> {
channel = claim.channel_name;
}
return (
return !name && hideNoResult ? null : (
<section
className={classnames('file-tile card--link', {
'file-tile--fullwidth': fullWidth,

View file

@ -59,6 +59,7 @@ class SearchPage extends React.PureComponent<Props> {
</React.Fragment>
)}
<FileListSearch query={query} />
<div className="help">{__('These search results are provided by LBRY, Inc.')}</div>
</div>
</Page>
);