lbry-desktop/ui/js/page/search/view.jsx

49 lines
1.4 KiB
React
Raw Normal View History

2017-06-06 23:19:12 +02:00
import React from "react";
import lbryuri from "lbryuri";
import FileTile from "component/fileTile";
import FileListSearch from "component/fileListSearch";
import { ToolTip } from "component/tooltip.js";
2017-05-05 10:01:16 +02:00
2017-06-08 06:42:19 +02:00
class SearchPage extends React.PureComponent {
render() {
2017-06-06 23:19:12 +02:00
const { query } = this.props;
return (
<main className="main--single-column">
2017-06-06 23:19:12 +02:00
{lbryuri.isValid(query)
? <section className="section-spaced">
<h3 className="card-row__header">
{__("Exact URL")}
{" "}
<ToolTip
label="?"
body={__(
"This is the resolution of a LBRY URL and not controlled by LBRY Inc."
)}
className="tooltip--header"
/>
</h3>
<FileTile
uri={lbryuri.normalize(query)}
showEmpty={FileTile.SHOW_EMPTY_PUBLISH}
/>
</section>
: ""}
2017-05-05 10:01:16 +02:00
<section className="section-spaced">
<h3 className="card-row__header">
2017-06-06 23:19:12 +02:00
{__("Search Results for")} {query}
{" "}
<ToolTip
label="?"
body={__("These search results are provided by LBRY, Inc.")}
className="tooltip--header"
/>
2017-05-05 10:01:16 +02:00
</h3>
<FileListSearch query={query} />
</section>
</main>
2017-06-06 23:19:12 +02:00
);
}
2017-05-05 10:01:16 +02:00
}
export default SearchPage;