add search results disclaimer
This commit is contained in:
parent
2fe2cbacee
commit
9161ba1a62
4 changed files with 7 additions and 3 deletions
|
@ -35,6 +35,7 @@
|
||||||
}],
|
}],
|
||||||
"func-names": ["warn", "as-needed"],
|
"func-names": ["warn", "as-needed"],
|
||||||
"jsx-a11y/label-has-for": 0,
|
"jsx-a11y/label-has-for": 0,
|
||||||
"import/prefer-default-export": 0
|
"import/prefer-default-export": 0,
|
||||||
|
"no-return-assign": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ class FileListSearch extends React.PureComponent<Props> {
|
||||||
<div className="search-result__column">
|
<div className="search-result__column">
|
||||||
<div className="file-list__header">{__('Your downloads')}</div>
|
<div className="file-list__header">{__('Your downloads')}</div>
|
||||||
{downloadUris && downloadUris.length ? (
|
{downloadUris && downloadUris.length ? (
|
||||||
downloadUris.map(uri => <FileTile test key={uri} uri={uri} />)
|
downloadUris.map(uri => <FileTile hideNoResult key={uri} uri={uri} />)
|
||||||
) : (
|
) : (
|
||||||
<NoResults />
|
<NoResults />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -30,6 +30,7 @@ type Props = {
|
||||||
navigate: (string, ?{}) => void,
|
navigate: (string, ?{}) => void,
|
||||||
clearPublish: () => void,
|
clearPublish: () => void,
|
||||||
updatePublishForm: ({}) => void,
|
updatePublishForm: ({}) => void,
|
||||||
|
hideNoResult: boolean, // don't show the tile if there is no claim at this uri
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileTile extends React.PureComponent<Props> {
|
class FileTile extends React.PureComponent<Props> {
|
||||||
|
@ -62,6 +63,7 @@ class FileTile extends React.PureComponent<Props> {
|
||||||
isDownloaded,
|
isDownloaded,
|
||||||
clearPublish,
|
clearPublish,
|
||||||
updatePublishForm,
|
updatePublishForm,
|
||||||
|
hideNoResult,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const uri = normalizeURI(this.props.uri);
|
const uri = normalizeURI(this.props.uri);
|
||||||
|
@ -80,7 +82,7 @@ class FileTile extends React.PureComponent<Props> {
|
||||||
channel = claim.channel_name;
|
channel = claim.channel_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return !name && hideNoResult ? null : (
|
||||||
<section
|
<section
|
||||||
className={classnames('file-tile card--link', {
|
className={classnames('file-tile card--link', {
|
||||||
'file-tile--fullwidth': fullWidth,
|
'file-tile--fullwidth': fullWidth,
|
||||||
|
|
|
@ -59,6 +59,7 @@ class SearchPage extends React.PureComponent<Props> {
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
<FileListSearch query={query} />
|
<FileListSearch query={query} />
|
||||||
|
<div className="help">{__('These search results are provided by LBRY, Inc.')}</div>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue