From 8f0be5b3981a25853e794046cd59e8bbf66c85f5 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 23 May 2023 14:56:25 +0200 Subject: [PATCH] add fully styled author edits ui and tested logic --- src/components/EditModal.jsx | 8 +- src/components/styled/Thread.styled.jsx | 75 ++++++++- src/components/views/Thread.jsx | 211 +++++++++++++----------- src/hooks/stores/useGeneralStore.js | 3 + 4 files changed, 188 insertions(+), 109 deletions(-) diff --git a/src/components/EditModal.jsx b/src/components/EditModal.jsx index e92220ba..4bcbdff9 100644 --- a/src/components/EditModal.jsx +++ b/src/components/EditModal.jsx @@ -7,6 +7,7 @@ import Draggable from 'react-draggable'; const EditModal = ({ isOpen, closeModal, originalCommentContent }) => { const { + setEditedComment, selectedStyle, } = useGeneralStore(state => state); @@ -27,6 +28,10 @@ const EditModal = ({ isOpen, closeModal, originalCommentContent }) => { }, [setIsMobile]); + const handleSaveEdit = () => { + setEditedComment(commentRef.current.value); + closeModal(); + }; return ( {