lbry-desktop/src/renderer/page/search/view.jsx

42 lines
1.2 KiB
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import * as React from 'react';
2018-04-18 06:03:01 +02:00
import { isURIValid, normalizeURI } from 'lbry-redux';
import FileTile from 'component/fileTile';
import FileListSearch from 'component/fileListSearch';
2018-03-26 23:32:43 +02:00
import ToolTip from 'component/common/tooltip';
import Page from 'component/page';
import Icon from 'component/common/icon';
import * as icons from 'constants/icons';
2017-05-05 10:01:16 +02:00
2018-03-26 23:32:43 +02:00
type Props = {
query: ?string,
};
class SearchPage extends React.PureComponent<Props> {
render() {
2018-06-06 08:13:26 +02:00
const { query } = this.props;
return (
<Page>
2018-06-06 08:13:26 +02:00
{isURIValid(query) && (
<React.Fragment>
<div className="file-list__header">
{__('Exact URL')}
<ToolTip
icon
body={__('This is the resolution of a LBRY URL and not controlled by LBRY Inc.')}
>
<Icon icon={icons.HELP} />
</ToolTip>
</div>
<FileTile fullWidth uri={normalizeURI(query)} showUri />
</React.Fragment>
)}
<FileListSearch query={query} />
<div className="help">{__('These search results are provided by LBRY, Inc.')}</div>
2018-03-26 23:32:43 +02:00
</Page>
2017-06-06 23:19:12 +02:00
);
}
2017-05-05 10:01:16 +02:00
}
2018-03-26 23:32:43 +02:00
2017-05-05 10:01:16 +02:00
export default SearchPage;