From 54550e1f489947e8bc627eb2982b08876c1056ea Mon Sep 17 00:00:00 2001
From: Deva <97371915+Deva-1903@users.noreply.github.com>
Date: Tue, 26 Sep 2023 12:10:09 +0530
Subject: [PATCH] feat: add quote reply (#252)
* Added quote reply feature
* Made some changes in chat.jsx for quote reply feature
---------
Co-authored-by: Dunsin <78784850+Dun-sin@users.noreply.github.com>
---
client/src/components/Chat.jsx | 78 +++++++++++++++++++++++++++++++---
client/src/styles/chat.css | 4 +-
2 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/client/src/components/Chat.jsx b/client/src/components/Chat.jsx
index 965c7f5c..64797a95 100644
--- a/client/src/components/Chat.jsx
+++ b/client/src/components/Chat.jsx
@@ -329,6 +329,18 @@ const Chat = () => {
setEditing({ isediting: true, messageID: id });
};
+ const handleQuoteReply = (id) => {
+ inputRef.current.focus();
+
+ const { message } = getMessage(id);
+ if (message.includes('Warning Message')) {
+ cancelEdit();
+ return;
+ }
+ inputRef.current.value = `${message} --> `;
+
+ };
+
const handleTypingStatus = debounce((e) => {
if (e.target.value.length > 0) {
socket
@@ -365,6 +377,15 @@ const Chat = () => {
);
};
+ const renderIconButtonReceiver = (props) => {
+ return (
+