From 4b965790849535ea7f283cb62ff3046707929b5b Mon Sep 17 00:00:00 2001 From: audwls239 Date: Tue, 10 Jun 2025 10:33:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B1=84=ED=8C=85=20=EB=A9=A4=EB=B2=84?= =?UTF-8?q?=20=EB=AA=A9=EB=A1=9D=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99,=20=ED=83=80=EC=9D=B8=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=B2=84=ED=8A=BC=20=EC=82=AD=EC=A0=9C,?= =?UTF-8?q?=20=EB=82=B4=20=EC=83=81=ED=83=9C=EB=B3=80=EA=B2=BD=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ChatRoom.tsx | 105 ++++++++------------------- 1 file changed, 32 insertions(+), 73 deletions(-) diff --git a/frontend/src/components/ChatRoom.tsx b/frontend/src/components/ChatRoom.tsx index c1ac63f5..bc02a7d2 100644 --- a/frontend/src/components/ChatRoom.tsx +++ b/frontend/src/components/ChatRoom.tsx @@ -198,10 +198,10 @@ function ChatRoom({ chatRoomId, postTitle, onBack }: ChatRoomProps) { const result = await response.json(); const serverParticipants: ServerChatParticipant[] = result || []; const mappedParticipants: ChatParticipant[] = serverParticipants.map((p) => ({ - id: p.memberId, - name: p.memberName || "Unknown User", - image: p.memberImage, - status: p.chatMemberStatus || "UNKNOWN", + id: p.member_id, + name: p.member_name || "이름", + image: p.member_image, + status: p.chat_member_status || "상태", })); setParticipants(mappedParticipants); } catch (err: any) { @@ -378,27 +378,26 @@ function ChatRoom({ chatRoomId, postTitle, onBack }: ChatRoomProps) {
{postTitle || `채팅방 ${chatRoomId}`}
- {/* TODO: 채팅 Info 버튼 - 기능 구현 필요*/} - {/**/} - {/* */} - {/* */} - {/* */} - {/* */} - {/**/} + {/* Main Chat Area */} @@ -454,28 +453,10 @@ function ChatRoom({ chatRoomId, postTitle, onBack }: ChatRoomProps) {

참여중인 멤버

-
- {currentUserParticipant && ( + {/* TODO: 상태 변경 기능 보수 */} + {/* {currentUserParticipant && (
내 상태
- )} + )} */}
{loadingParticipants && ( @@ -525,7 +504,10 @@ function ChatRoom({ chatRoomId, postTitle, onBack }: ChatRoomProps) { key={participant.id} className="flex items-center justify-between p-2 hover:bg-[#f0f2f5] rounded-md transition-colors" > -
+
-
- {participant.id !== currentMemberId && ( - - )} +
))}