From e51f31f01582c8ebb67df816f52b89a2078fcac9 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 19 Nov 2019 12:41:31 -0500 Subject: [PATCH] dont re-resolve on empty claims --- ui/page/show/view.jsx | 7 ++++--- ui/scss/component/_form-field.scss | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index f499fb744..3beaab329 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -27,7 +27,8 @@ function ShowPage(props: Props) { const { channelName, channelClaimId, streamName, streamClaimId } = parseURI(uri); const signingChannel = claim && claim.signing_channel; const canonicalUrl = claim && claim.canonical_url; - const noClaim = claim === undefined; + const claimExists = claim !== null && claim !== undefined; + const haventFetchedYet = claim === undefined; useEffect(() => { // @if TARGET='web' @@ -39,10 +40,10 @@ function ShowPage(props: Props) { } // @endif - if (resolveUri && !isResolvingUri && uri && (noClaim || !canonicalUrl)) { + if ((resolveUri && !isResolvingUri && uri && haventFetchedYet) || (claimExists && !canonicalUrl)) { resolveUri(uri); } - }, [resolveUri, isResolvingUri, canonicalUrl, uri, noClaim]); + }, [resolveUri, isResolvingUri, canonicalUrl, uri, claimExists, haventFetchedYet]); useEffect(() => { if (title) { diff --git a/ui/scss/component/_form-field.scss b/ui/scss/component/_form-field.scss index c09a96f7b..acd1a5e85 100644 --- a/ui/scss/component/_form-field.scss +++ b/ui/scss/component/_form-field.scss @@ -155,7 +155,7 @@ fieldset-group { fieldset-section { width: auto; - margin-bottom: 0; + margin: 0; &:first-child { input,