From 56852955e4265ce8fece94c489bfb6c0bb9d2e7a Mon Sep 17 00:00:00 2001 From: saltrafael Date: Wed, 4 Aug 2021 10:12:49 -0300 Subject: [PATCH] Add reply --- ui/component/commentCreate/view.jsx | 54 ++++++++++++++++++++++++----- ui/component/notification/index.js | 2 ++ ui/component/notification/view.jsx | 41 ++++++++++++++-------- ui/component/selectChannel/view.jsx | 4 +++ ui/scss/component/_comments.scss | 1 + 5 files changed, 80 insertions(+), 22 deletions(-) diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 8e113f269..a1936d73d 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -80,7 +80,7 @@ export function CommentCreate(props: Props) { const [isSubmitting, setIsSubmitting] = React.useState(false); const [commentFailure, setCommentFailure] = React.useState(false); const [successTip, setSuccessTip] = React.useState({ txid: undefined, tipAmount: undefined }); - const { claim_id: claimId } = claim; + const claimId = claim && claim.claim_id; const [isSupportComment, setIsSupportComment] = React.useState(); const [isReviewingSupportComment, setIsReviewingSupportComment] = React.useState(); const [tipAmount, setTipAmount] = React.useState(1); @@ -330,9 +330,21 @@ export function CommentCreate(props: Props) { ? __('Re-submit') : __('Send') } - onClick={handleSupportComment} + onClick={(e) => { + e.stopPropagation(); + e.preventDefault(); + handleSupportComment(); + }} + /> +