From 0c455fafa3fca9defb4e8ba9e608b8eb13ded40e Mon Sep 17 00:00:00 2001 From: saltrafael Date: Mon, 9 Aug 2021 13:41:03 -0300 Subject: [PATCH] Fix comment create redirection --- CHANGELOG.md | 1 + ui/component/commentCreate/view.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index becebef46..93caaaafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix embed shows wrong OG metadata _community pr!_ ([#6815](https://github.com/lbryio/lbry-desktop/pull/6815)) - Fix OG: "Unparsable data structure - Truncated Unicode character" _community pr!_ ([#6839](https://github.com/lbryio/lbry-desktop/pull/6839)) - Fix Paid embed warning overlay redirection button now links to odysee _community pr!_ ([#6819](https://github.com/lbryio/lbry-desktop/pull/6819)) +- Fix comment section redirection to create channel _community pr!_ ([#6557](https://github.com/lbryio/lbry-desktop/pull/6557)) ## [0.51.1] - [2021-06-26] diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index b6f02353f..008a28aa1 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -51,7 +51,6 @@ type Props = { claimIsMine: boolean, sendTip: ({}, (any) => void, (any) => void) => void, doToast: ({ message: string }) => void, - disabled: boolean, doFetchCreatorSettings: (channelId: string) => Promise, settingsByChannelId: { [channelId: string]: PerChannelSettings }, }; @@ -95,7 +94,7 @@ export function CommentCreate(props: Props) { const charCount = commentValue.length; const [activeTab, setActiveTab] = React.useState(''); const [tipError, setTipError] = React.useState(); - const disabled = isSubmitting || !activeChannelClaim || !commentValue.length; + const disabled = isSubmitting || isFetchingChannels || !commentValue.length; const [shouldDisableReviewButton, setShouldDisableReviewButton] = React.useState(); const channelId = getChannelIdFromClaim(claim); const channelSettings = channelId ? settingsByChannelId[channelId] : undefined; @@ -370,7 +369,7 @@ export function CommentCreate(props: Props) { return ; } - if (!hasChannels) { + if (!isFetchingChannels && !hasChannels) { return (
setIsReviewingSupportComment(true)} + requiresAuth={IS_WEB} />