use search selector and add file tile channel links
This commit is contained in:
parent
f23bc00af6
commit
5a905fe174
4 changed files with 6 additions and 5 deletions
|
@ -36,7 +36,7 @@ class FileListSearch extends React.PureComponent<Props> {
|
|||
<React.Fragment>
|
||||
<div className="search__results">
|
||||
<div className="search-result__row">
|
||||
<div className="file-list__header">{__('Content')}</div>
|
||||
<div className="file-list__header">{__('Search Results')}</div>
|
||||
<HiddenNsfwClaims uris={uris} />
|
||||
{!isSearching && fileResults.length ? (
|
||||
fileResults.map(uri => <FileTile key={uri} uri={uri} />)
|
||||
|
|
|
@ -9,6 +9,7 @@ import Icon from 'component/common/icon';
|
|||
import Button from 'component/button';
|
||||
import classnames from 'classnames';
|
||||
import FilePrice from 'component/filePrice';
|
||||
import UriIndicator from 'component/uriIndicator';
|
||||
|
||||
type Props = {
|
||||
showUri: boolean,
|
||||
|
@ -90,10 +91,8 @@ class FileTile extends React.PureComponent<Props> {
|
|||
const onClick = () => navigate('/show', { uri });
|
||||
|
||||
let name;
|
||||
let channel;
|
||||
if (claim) {
|
||||
({ name } = claim);
|
||||
channel = claim.channel_name;
|
||||
}
|
||||
|
||||
return !name && hideNoResult ? null : (
|
||||
|
@ -137,7 +136,7 @@ class FileTile extends React.PureComponent<Props> {
|
|||
})}
|
||||
>
|
||||
<span className="file-tile__channel">
|
||||
{showUri ? uri : channel || __('Anonymous')}
|
||||
{showUri ? uri : <UriIndicator uri={uri} link />}
|
||||
</span>
|
||||
</div>
|
||||
<div className="card__file-properties">
|
||||
|
|
|
@ -2,6 +2,7 @@ import { connect } from 'react-redux';
|
|||
import {
|
||||
selectSearchState as selectSearch,
|
||||
selectWunderBarAddress,
|
||||
selectSearchSuggestions,
|
||||
doUpdateSearchQuery,
|
||||
doFocusSearchInput,
|
||||
doBlurSearchInput,
|
||||
|
@ -23,6 +24,7 @@ const select = state => {
|
|||
return {
|
||||
...searchState,
|
||||
wunderbarValue,
|
||||
suggestions: selectSearchSuggestions(state),
|
||||
resultCount: makeSelectClientSetting(settings.RESULT_COUNT)(state),
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ export type Claim = {
|
|||
valid_at_height: number,
|
||||
value: ?{
|
||||
publisherSignature: ?{
|
||||
certificateId: ?string,
|
||||
certificateId: string,
|
||||
},
|
||||
stream: {
|
||||
metadata: Metadata,
|
||||
|
|
Loading…
Add table
Reference in a new issue