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 {
|
2017-05-11 02:59:47 +02:00
|
|
|
render() {
|
2017-06-06 23:19:12 +02:00
|
|
|
const { query } = this.props;
|
2017-05-11 02:59:47 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<main className="main--single-column">
|
2017-11-24 15:31:05 +01: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"
|
2017-06-06 23:19:12 +02:00
|
|
|
/>
|
2017-11-24 15:31:05 +01:00
|
|
|
</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-11-24 15:31:05 +01:00
|
|
|
{__("Search Results for")} {query}{" "}
|
2017-06-06 23:19:12 +02:00
|
|
|
<ToolTip
|
|
|
|
label="?"
|
|
|
|
body={__("These search results are provided by LBRY, Inc.")}
|
|
|
|
className="tooltip--header"
|
|
|
|
/>
|
2017-05-05 10:01:16 +02:00
|
|
|
</h3>
|
2017-05-11 02:59:47 +02:00
|
|
|
<FileListSearch query={query} />
|
|
|
|
</section>
|
|
|
|
</main>
|
2017-06-06 23:19:12 +02:00
|
|
|
);
|
2017-05-11 02:59:47 +02:00
|
|
|
}
|
2017-05-05 10:01:16 +02:00
|
|
|
}
|
|
|
|
export default SearchPage;
|