Revert "Hiding URIs header for invalid URIs"

This reverts commit 8f407a36d4.
This commit is contained in:
Sean Yesmunt 2020-09-10 11:30:42 -04:00
parent 80707a37df
commit c80b28ade9

View file

@ -3,7 +3,7 @@ import { SIMPLE_SITE, SHOW_ADS } from 'config';
import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import React, { useEffect, Fragment } from 'react';
import { Lbry, regexInvalidURI, parseURI, isNameValid } from 'lbry-redux';
import { Lbry, regexInvalidURI, parseURI } from 'lbry-redux';
import ClaimPreview from 'component/claimPreview';
import ClaimList from 'component/claimList';
import Page from 'component/page';
@ -50,13 +50,11 @@ export default function SearchPage(props: Props) {
}
const INVALID_URI_CHARS = new RegExp(regexInvalidURI, 'gu');
let isValid = false;
let path;
let isValid = true;
try {
let { streamName } = parseURI(urlQuery.replace(/ /g, '-').replace(/:/g, '#'));
if (!isNameValid(streamName)) {
isValid = false;
}
({ path } = parseURI(urlQuery.replace(/ /g, '-').replace(/:/g, '#')));
isValid = true;
} catch (e) {
isValid = false;
}
@ -96,7 +94,7 @@ export default function SearchPage(props: Props) {
<section className="search">
{urlQuery && (
<Fragment>
{!SIMPLE_SITE && isValid && (
{!SIMPLE_SITE && (
<header className="search__header">
<div className="claim-preview__actions--header">
<ClaimUri uri={uriFromQuery} noShortUrl />