From 42d93a3deafe7b7b052f6134be4f4d9383e4c40c Mon Sep 17 00:00:00 2001 From: mayeaux Date: Mon, 19 Jul 2021 03:47:39 +0200 Subject: [PATCH] Latest changes to odysee (#6536) * disable review button if no card saved also some cleanup * fix flow errors --- ui/component/commentCreate/view.jsx | 11 +++----- ui/component/walletSendTip/view.jsx | 4 +-- ui/component/walletTipAmountSelector/view.jsx | 26 +++++++++++-------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index e8f00b1e9..1fce8fb04 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -91,16 +91,14 @@ export function CommentCreate(props: Props) { const [commentValue, setCommentValue] = React.useState(''); const [advancedEditor, setAdvancedEditor] = usePersistedState('comment-editor-mode', false); const hasChannels = channels && channels.length; - const disabled = isSubmitting || !activeChannelClaim || !commentValue.length; const charCount = commentValue.length; const [activeTab, setActiveTab] = React.useState(''); const [tipError, setTipError] = React.useState(); - // React.useEffect(() => { - // setTipError('yes'); - // }, []); + const disabled = isSubmitting || !activeChannelClaim || !commentValue.length; + const [shouldDisableReviewButton, setShouldDisableReviewButton] = React.useState(); function handleCommentChange(event) { let commentValue; @@ -390,10 +388,10 @@ export function CommentCreate(props: Props) { autoFocus={isReply} textAreaMaxLength={livestream ? FF_MAX_CHARS_IN_LIVESTREAM_COMMENT : FF_MAX_CHARS_IN_COMMENT} /> - {/* TODO: the tip validation is done in selector */} {isSupportComment && (