From b90df309ab1e114902deca7531f05965fd091c34 Mon Sep 17 00:00:00 2001 From: young Date: Sat, 28 Dec 2024 23:07:28 +0900 Subject: [PATCH 01/13] =?UTF-8?q?Refactor:=20opponent=20->=20otherUser?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Chats/ChatRoom/ChatBox/index.tsx | 8 ++++---- src/pages/Chats/ChatRoom/ChatBox/styles.tsx | 8 ++++---- src/pages/Chats/ChatRoom/index.tsx | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pages/Chats/ChatRoom/ChatBox/index.tsx b/src/pages/Chats/ChatRoom/ChatBox/index.tsx index 7b1890b1..0f7ddae1 100644 --- a/src/pages/Chats/ChatRoom/ChatBox/index.tsx +++ b/src/pages/Chats/ChatRoom/ChatBox/index.tsx @@ -14,10 +14,10 @@ const ChatBox: React.FC = () => { const { chatRoomId } = useParams(); const currentUserId = getCurrentUserId(); const otherUser = useRecoilValue(OtherUserAtom); - const isOpponentValid = !!(otherUser && otherUser.id); + const isOtherUserValid = !!(otherUser && otherUser.id); useEffect(() => { - if (textareaRef.current && !isOpponentValid) { + if (textareaRef.current && !isOtherUserValid) { textareaRef.current.disabled = true; textareaRef.current.placeholder = '메시지를 보낼 수 없습니다.'; } @@ -64,7 +64,7 @@ const ChatBox: React.FC = () => { return (