fix: show search filters always

This commit is contained in:
Sean Yesmunt 2019-04-15 00:06:35 -04:00
parent ab3502bacc
commit 2d897953e1

View file

@ -21,7 +21,8 @@ export default function SearchPage(props: Props) {
const urlParams = new URLSearchParams(search); const urlParams = new URLSearchParams(search);
const urlQuery = urlParams.get('q'); const urlQuery = urlParams.get('q');
const isValid = isURIValid(urlQuery); const isValid = isURIValid(urlQuery);
console.log({ isValid });
console.log({ urlQuery });
let uri; let uri;
let isChannel; let isChannel;
let label; let label;
@ -41,22 +42,20 @@ export default function SearchPage(props: Props) {
<section className="search"> <section className="search">
{urlQuery && ( {urlQuery && (
<Fragment> <Fragment>
<header className="search__header"> {isValid && (
{isValid && ( <header className="search__header">
<Fragment> <h1 className="media__uri">{uri}</h1>
<SearchOptions /> {isChannel ? (
<ChannelTile size="large" isSearchResult uri={uri} />
<h1 className="media__uri">{uri}</h1> ) : (
{isChannel ? ( <FileTile size="large" isSearchResult displayHiddenMessage uri={uri} />
<ChannelTile size="large" isSearchResult uri={uri} /> )}
) : ( </header>
<FileTile size="large" isSearchResult displayHiddenMessage uri={uri} /> )}
)}
</Fragment>
)}
</header>
<div className="search__results-wrapper"> <div className="search__results-wrapper">
<SearchOptions />
<FileListSearch query={urlQuery} /> <FileListSearch query={urlQuery} />
<div className="card__content help"> <div className="card__content help">
{__('These search results are provided by LBRY, Inc.')} {__('These search results are provided by LBRY, Inc.')}