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 && (
<Fragment> <header className="search__header">
<SearchOptions />
<h1 className="media__uri">{uri}</h1> <h1 className="media__uri">{uri}</h1>
{isChannel ? ( {isChannel ? (
<ChannelTile size="large" isSearchResult uri={uri} /> <ChannelTile size="large" isSearchResult uri={uri} />
) : ( ) : (
<FileTile size="large" isSearchResult displayHiddenMessage uri={uri} /> <FileTile size="large" isSearchResult displayHiddenMessage uri={uri} />
)} )}
</Fragment>
)}
</header> </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.')}