fix: add cancel button for editing comments (#580)

* fix: add cancel button for editing comments

* cleanup

---------

Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
This commit is contained in:
Naifer
2025-01-15 17:37:57 +01:00
committed by GitHub
parent f7efb6c2c9
commit 71cfe3cd8e
2 changed files with 21 additions and 3 deletions

View File

@ -58,6 +58,9 @@ function CommentListItem({ comment }: CommentListItemProps) {
function handleEditToggle() {
setIsEditing(true);
}
function cancelEdit() {
setIsEditing(false);
}
return (
<Box ref={ref} pb="xs">
@ -115,6 +118,8 @@ function CommentListItem({ comment }: CommentListItemProps) {
<CommentActions
onSave={handleUpdateComment}
isLoading={isLoading}
onCancel={cancelEdit}
isCommentEditor={true}
/>
</>
)}