From 67ef14f372bba7027913e28fec3f173890a55501 Mon Sep 17 00:00:00 2001 From: young Date: Thu, 27 Feb 2025 23:11:35 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=EC=B1=84=ED=8C=85=EB=B0=A9=EC=9D=B4?= =?UTF-8?q?=20=EC=97=86=EC=9D=84=20=EB=95=8C=20UI=20=EC=A0=9C=EA=B1=B0=20&?= =?UTF-8?q?=20=EC=98=A4=EB=94=A9=EC=9D=B4=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B8=B0=EB=B3=B8=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MatchingRoom/MatchingMessage/index.tsx | 6 ++-- .../MatchingRoom/NoMatchingMessage/index.tsx | 4 ++- src/pages/Chats/MatchingRoom/index.tsx | 30 ++++++++----------- .../RecentChat/MatchingRoomItem/index.tsx | 4 ++- src/pages/Chats/RecentChat/index.tsx | 11 ++----- src/pages/Chats/RecentChat/styles.tsx | 8 ----- 6 files changed, 25 insertions(+), 38 deletions(-) diff --git a/src/pages/Chats/MatchingRoom/MatchingMessage/index.tsx b/src/pages/Chats/MatchingRoom/MatchingMessage/index.tsx index ee9ad9fc..5abbb4e7 100644 --- a/src/pages/Chats/MatchingRoom/MatchingMessage/index.tsx +++ b/src/pages/Chats/MatchingRoom/MatchingMessage/index.tsx @@ -2,6 +2,8 @@ import dayjs from 'dayjs'; import RcvdMessage from '@pages/Chats/RcvdMessage'; +import defaultProfile from '@assets/default/defaultProfile.svg'; + import type { MatchingData } from '@apis/matching/dto'; import type { RcvdMessageProps } from '@pages/Chats/RcvdMessage/dto'; @@ -14,7 +16,7 @@ const MatchingMessage: React.FC = ({ id, message, createdAt, chatR const firstMessageProps: RcvdMessageProps = { fromUserNickname: '오딩이', - profilePictureUrl: '', + profilePictureUrl: defaultProfile, content: '얘가 너 소개받고 싶대', isSenderChanged: false, isProfileImageVisible: true, @@ -24,7 +26,7 @@ const MatchingMessage: React.FC = ({ id, message, createdAt, chatR const matchingMessageProps: RcvdMessageProps = { fromUserNickname: '오딩이', - profilePictureUrl: '', + profilePictureUrl: defaultProfile, content: message, isSenderChanged: false, isProfileImageVisible: false, diff --git a/src/pages/Chats/MatchingRoom/NoMatchingMessage/index.tsx b/src/pages/Chats/MatchingRoom/NoMatchingMessage/index.tsx index 9385e7f9..aa8b384a 100644 --- a/src/pages/Chats/MatchingRoom/NoMatchingMessage/index.tsx +++ b/src/pages/Chats/MatchingRoom/NoMatchingMessage/index.tsx @@ -2,6 +2,8 @@ import dayjs from 'dayjs'; import RcvdMessage from '@pages/Chats/RcvdMessage'; +import defaultProfile from '@assets/default/defaultProfile.svg'; + import type { RcvdMessageProps } from '@pages/Chats/RcvdMessage/dto'; const NoMatchingMessage: React.FC = () => { @@ -9,7 +11,7 @@ const NoMatchingMessage: React.FC = () => { const messageProps: RcvdMessageProps = { fromUserNickname: '오딩이', - profilePictureUrl: '', + profilePictureUrl: defaultProfile, content: '매칭이 들어오면 오딩이가 알려줄게!', isSenderChanged: true, isProfileImageVisible: true, diff --git a/src/pages/Chats/MatchingRoom/index.tsx b/src/pages/Chats/MatchingRoom/index.tsx index 7dc8eda3..8bc73f39 100644 --- a/src/pages/Chats/MatchingRoom/index.tsx +++ b/src/pages/Chats/MatchingRoom/index.tsx @@ -94,23 +94,19 @@ const MatchingRoom: React.FC = () => { $withBorder={true} /> - {allMatchings.length === 0 ? ( - - ) : ( - allMatchings.map((matching: MatchingData) => { - console.log(matching); - return ( -
- - -
- ); - }) - )} + {allMatchings.map((matching: MatchingData) => { + console.log(matching); + return ( +
+ + +
+ ); + })} {!hasNewMatching && }
diff --git a/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx b/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx index 3900110b..9ce9d0aa 100644 --- a/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx +++ b/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx @@ -8,6 +8,8 @@ import theme from '@styles/theme'; import { LatestMatchingData } from '@apis/matching/dto'; +import defaultProfile from '@assets/default/defaultProfile.svg'; + import { StyledText } from '@components/Text/StyledText'; import { UserImage, MatchingRoomLayout, LeftBox, RightBox, LatestMessage } from './styles'; @@ -40,7 +42,7 @@ const MatchingRoomItem: React.FC> = ({ requestStatus return ( - + 오딩이 diff --git a/src/pages/Chats/RecentChat/index.tsx b/src/pages/Chats/RecentChat/index.tsx index 97bd23bd..54a2f4ab 100644 --- a/src/pages/Chats/RecentChat/index.tsx +++ b/src/pages/Chats/RecentChat/index.tsx @@ -7,14 +7,13 @@ import { useSocket } from '@context/SocketProvider'; import { getCurrentUserId } from '@utils/getCurrentUserId'; import Loading from '@components/Loading'; -import { StyledText } from '@components/Text/StyledText'; import type { ChatRoomData } from '@apis/chatting/dto'; import ChatRoomItem from './ChatRoomItem/index'; import MatchingRoomItem from './MatchingRoomItem/index'; -import { ChatRoomList, NoChatRoomWrapper, RecentChatInfo } from './styles'; +import { ChatRoomList, RecentChatInfo } from './styles'; const RecentChat: React.FC = () => { const [chatRoomList, setChatRoomList] = useState([]); @@ -72,7 +71,7 @@ const RecentChat: React.FC = () => { <> {isLoading ? ( - ) : chatRoomList.length !== 0 ? ( + ) : ( <> 최근 채팅방 @@ -84,12 +83,6 @@ const RecentChat: React.FC = () => { ))} - ) : ( - - - 개설된 채팅방이 없어요. - - )} ); diff --git a/src/pages/Chats/RecentChat/styles.tsx b/src/pages/Chats/RecentChat/styles.tsx index 7de1cfe6..90938f64 100644 --- a/src/pages/Chats/RecentChat/styles.tsx +++ b/src/pages/Chats/RecentChat/styles.tsx @@ -13,11 +13,3 @@ export const ChatRoomList = styled.ul` gap: 1rem; padding: 0.62rem 1.25rem; `; - -export const NoChatRoomWrapper = styled.div` - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; -`; From e840ad371d00832df06e803656de5610d182c914 Mon Sep 17 00:00:00 2001 From: young Date: Fri, 28 Feb 2025 16:18:34 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=EA=B8=B0=EC=A1=B4=20=EB=A7=A4?= =?UTF-8?q?=EC=B9=AD=20=EC=8B=A0=EC=B2=AD=20=EB=A1=9C=EC=A7=81=EC=9D=84=20?= =?UTF-8?q?=EC=86=8C=EC=BC=93=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/matching/dto.ts | 29 -------------------------- src/apis/matching/index.ts | 16 -------------- src/pages/Chats/MatchingRoom/index.tsx | 1 + src/pages/Home/OOTD/Feed/index.tsx | 3 ++- src/pages/Profile/index.tsx | 29 ++++++++++++-------------- 5 files changed, 16 insertions(+), 62 deletions(-) delete mode 100644 src/apis/matching/index.ts diff --git a/src/apis/matching/dto.ts b/src/apis/matching/dto.ts index e88e4486..99fdff8e 100644 --- a/src/apis/matching/dto.ts +++ b/src/apis/matching/dto.ts @@ -1,5 +1,3 @@ -import type { BaseSuccessResponse } from '@apis/core/dto'; - type RequestStatusEnum = 'accepted' | 'rejected' | 'pending'; // 매칭 요청 @@ -10,16 +8,6 @@ export interface CreateMatchingRequest { message: string; } -// response -export type CreateMatchingResponse = BaseSuccessResponse; - -export interface CreateMatchingData { - id: number; // matchingId - chatRoomId: number; - requesterId: number; - targetId: number; -} - // 최근 매칭 조회 (채팅방 리스트에서) export interface LatestMatchingData { id?: number; @@ -56,20 +44,3 @@ export interface PostImageDto { url: string; orderNum: number; } - -// 매칭 요청 수락 및 거절 -// request -export interface ModifyMatchingStatusRequest { - requestStatus: 'accept' | 'reject'; -} - -// response -export type ModifyMatchingStatusResponse = BaseSuccessResponse; - -export interface ModifyMatchingStatusData { - id: number; // matchingId - requesterId: number; - targetId: number; - requestStatus: string; - chatRoomId: number; -} diff --git a/src/apis/matching/index.ts b/src/apis/matching/index.ts deleted file mode 100644 index aa628ac5..00000000 --- a/src/apis/matching/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { newRequest } from '@apis/core'; - -import type { - CreateMatchingRequest, - CreateMatchingResponse, - ModifyMatchingStatusRequest, - ModifyMatchingStatusResponse, -} from './dto'; - -// 매칭 생성 -export const createMatchingApi = (data: CreateMatchingRequest) => - newRequest.post('/matching', data); - -// 매칭 요청 수락 및 거절 -export const modifyMatchingStatusApi = (matchingId: number, data: ModifyMatchingStatusRequest) => - newRequest.patch(`/matching/${matchingId}`, data); diff --git a/src/pages/Chats/MatchingRoom/index.tsx b/src/pages/Chats/MatchingRoom/index.tsx index 8bc73f39..60afdacd 100644 --- a/src/pages/Chats/MatchingRoom/index.tsx +++ b/src/pages/Chats/MatchingRoom/index.tsx @@ -65,6 +65,7 @@ const MatchingRoom: React.FC = () => { if (JSON.stringify(data) === '{}') { setHasNewMatching(false); } else { + setHasNewMatching(true); setAllMatchings([...allMatchings, data]); } }; diff --git a/src/pages/Home/OOTD/Feed/index.tsx b/src/pages/Home/OOTD/Feed/index.tsx index a36383ce..f854c3b4 100644 --- a/src/pages/Home/OOTD/Feed/index.tsx +++ b/src/pages/Home/OOTD/Feed/index.tsx @@ -152,12 +152,13 @@ const Feed: React.FC = ({ feed }) => { socket.on('error', (data) => { setModalContent(data); - setIsMatchingCommentBottomSheetOpen(false); setIsStatusModalOpen(true); // 리스너가 중복 등록되지 않도록 바로 정리 socket.off('error'); }); + + setIsMatchingCommentBottomSheetOpen(false); }; // 게시글 옵션(더보기) 바텀시트 diff --git a/src/pages/Profile/index.tsx b/src/pages/Profile/index.tsx index 4953104f..5b8a41e6 100644 --- a/src/pages/Profile/index.tsx +++ b/src/pages/Profile/index.tsx @@ -5,9 +5,9 @@ import { useRecoilValue } from 'recoil'; import theme from '@styles/theme'; -import { createMatchingApi } from '@apis/matching'; import { getUserPostListApi } from '@apis/post'; import { getUserInfoApi } from '@apis/user'; +import { useSocket } from '@context/SocketProvider'; import { OtherUserAtom } from '@recoil/util/OtherUser'; import { getCurrentUserId } from '@utils/getCurrentUserId'; @@ -56,6 +56,7 @@ const Profile: React.FC = () => { const [isModalOpen, setIsModalOpen] = useState(false); const [modalContent, setModalContent] = useState(''); const navigate = useNavigate(); + const socket = useSocket('matching'); const { userId } = useParams<{ userId: string }>(); const profileUserId = Number(userId); @@ -81,26 +82,22 @@ const Profile: React.FC = () => { fetchData(); }, [profileUserId]); - const createMatching = async (message: string) => { - const matchingRequestData = { + const createMatching = (comment: string) => { + socket.emit('requestMatching', { requesterId: currentUserId, targetId: otherUser?.id || profileUserId, - message: message, - }; + message: comment, + }); - try { - await createMatchingApi(matchingRequestData); - handleModalOpen(`${userInfo?.nickname}님에게 대표 OOTD와 \n한 줄 메세지를 보냈어요!`); - } catch (error) { - console.error('매칭 신청 오류:', error); - handleModalOpen('매칭 신청에 실패했습니다.'); - } - }; + socket.on('error', (data) => { + setModalContent(data); + setIsModalOpen(true); + + // 리스너가 중복 등록되지 않도록 바로 정리 + socket.off('error'); + }); - const handleModalOpen = (message: string) => { setIsBottomSheetOpen(false); - setModalContent(message); - setIsModalOpen(true); }; if (isLoading) return ; From 4b7938d054b07223f8e4b847a5d200c62bc6d91e Mon Sep 17 00:00:00 2001 From: young Date: Mon, 10 Mar 2025 12:56:38 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=EC=9D=B8=EC=A6=9D=EC=9D=B4=20?= =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=9D=B8?= =?UTF-8?q?=EC=A6=9D=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 5fa32a42..47625b74 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom'; import Home from '@pages/Home'; @@ -28,9 +28,21 @@ import ChatRoom from '@pages/Chats/ChatRoom'; import MatchingRoom from '@pages/Chats/MatchingRoom'; import NotFound from '@pages/NotFound'; +import { getUserInfoApi } from '@apis/user'; +import { getCurrentUserId } from '@utils/getCurrentUserId'; const ProtectedRoute = ({ children }: { children: JSX.Element }) => { - const isAuthenticated = Boolean(localStorage.getItem('new_jwt_token')); + const [isAuthenticated, setIsAuthenticated] = useState(null); + + useEffect(() => { + const checkAuth = async () => { + const currentUserId = getCurrentUserId(); + const response = await getUserInfoApi(currentUserId); + setIsAuthenticated(response.isSuccess); + }; + checkAuth(); + }, []); + return isAuthenticated ? children : ; }; From 33419256e5a84e5752b89c90a30f408e4ee76393 Mon Sep 17 00:00:00 2001 From: young Date: Mon, 10 Mar 2025 13:05:06 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20isAuthenticated=EA=B0=80=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=EB=90=98=EA=B8=B0=20=EC=A0=84?= =?UTF-8?q?=EC=97=90=20return=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 47625b74..175c94a0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -30,6 +30,7 @@ import MatchingRoom from '@pages/Chats/MatchingRoom'; import NotFound from '@pages/NotFound'; import { getUserInfoApi } from '@apis/user'; import { getCurrentUserId } from '@utils/getCurrentUserId'; +import Loading from '@components/Loading'; const ProtectedRoute = ({ children }: { children: JSX.Element }) => { const [isAuthenticated, setIsAuthenticated] = useState(null); @@ -43,6 +44,10 @@ const ProtectedRoute = ({ children }: { children: JSX.Element }) => { checkAuth(); }, []); + if (isAuthenticated === null) { + return ; + } + return isAuthenticated ? children : ; }; From d0d86952dafbc4b7211afead7bb3160ba89ea3e5 Mon Sep 17 00:00:00 2001 From: young Date: Mon, 10 Mar 2025 13:16:09 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=EB=A7=A4=EC=B9=AD=EB=A3=B8=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Chats/MatchingRoom/Card/index.tsx | 4 ++-- .../MatchingRoom/ResponseMessage/index.tsx | 21 ++++++++++++++++--- .../MatchingRoom/ResponseMessage/styles.tsx | 2 +- src/pages/Chats/MatchingRoom/index.tsx | 11 +++++++++- src/pages/Chats/RcvdMessage/index.tsx | 16 +++++++------- src/pages/Chats/RcvdMessage/styles.tsx | 3 +-- .../Chats/RecentChat/ChatRoomItem/index.tsx | 2 +- .../RecentChat/MatchingRoomItem/index.tsx | 2 +- 8 files changed, 43 insertions(+), 18 deletions(-) diff --git a/src/pages/Chats/MatchingRoom/Card/index.tsx b/src/pages/Chats/MatchingRoom/Card/index.tsx index 960c8704..2cf8c5ec 100644 --- a/src/pages/Chats/MatchingRoom/Card/index.tsx +++ b/src/pages/Chats/MatchingRoom/Card/index.tsx @@ -30,7 +30,7 @@ const Card: React.FC = ({ requester }) => { @@ -39,7 +39,7 @@ const Card: React.FC = ({ requester }) => {
{requester.representativePost.styleTags.map((tag, index) => (
- + {tag} {index < requester.representativePost.styleTags.length - 1 && ( diff --git a/src/pages/Chats/MatchingRoom/ResponseMessage/index.tsx b/src/pages/Chats/MatchingRoom/ResponseMessage/index.tsx index 755dc575..f6ce1059 100644 --- a/src/pages/Chats/MatchingRoom/ResponseMessage/index.tsx +++ b/src/pages/Chats/MatchingRoom/ResponseMessage/index.tsx @@ -1,25 +1,36 @@ import { useNavigate } from 'react-router-dom'; +import { useRecoilState } from 'recoil'; + +import theme from '@styles/theme'; + +import { RequesterDto } from '@apis/matching/dto'; import { useSocket } from '@context/SocketProvider'; +import { OtherUserAtom } from '@recoil/util/OtherUser'; + +import { StyledText } from '@components/Text/StyledText'; import { ResponseButton, ResponseContainer } from './styles'; export interface ResponseMessageProps { matchingId: number; chatRoomId: number; + requester: Omit; requestStatus: 'accepted' | 'rejected' | 'pending'; } -const ResponseMessage: React.FC = ({ matchingId, chatRoomId, requestStatus }) => { +const ResponseMessage: React.FC = ({ matchingId, chatRoomId, requester, requestStatus }) => { const socket = useSocket('matching'); const isPending = requestStatus === 'pending'; const nav = useNavigate(); + const [, setOtherUser] = useRecoilState(OtherUserAtom); const handlebuttonClick = (status: 'accept' | 'reject') => { if (requestStatus !== 'pending') return; if (socket) { socket.emit('patchMatching', { id: matchingId, requestStatus: status }); if (status === 'accept') { + setOtherUser(requester); nav(`/chats/${chatRoomId}`); } } @@ -29,12 +40,16 @@ const ResponseMessage: React.FC = ({ matchingId, chatRoomI {(requestStatus === 'pending' || requestStatus === 'rejected') && ( handlebuttonClick('reject')}> - 거절 + + 거절 + )} {(requestStatus === 'pending' || requestStatus === 'accepted') && ( handlebuttonClick('accept')}> - 수락 + + 수락 + )} diff --git a/src/pages/Chats/MatchingRoom/ResponseMessage/styles.tsx b/src/pages/Chats/MatchingRoom/ResponseMessage/styles.tsx index dab174ff..22742b70 100644 --- a/src/pages/Chats/MatchingRoom/ResponseMessage/styles.tsx +++ b/src/pages/Chats/MatchingRoom/ResponseMessage/styles.tsx @@ -11,6 +11,6 @@ export const ResponseButton = styled.button<{ $isPending: boolean }>` padding: 0.4rem 0.8rem; margin: 0.5rem 0; background-color: #f2f2f2; - border-radius: 0.5rem; + border-radius: 0.8rem; overflow-wrap: break-word; `; diff --git a/src/pages/Chats/MatchingRoom/index.tsx b/src/pages/Chats/MatchingRoom/index.tsx index 60afdacd..0087226f 100644 --- a/src/pages/Chats/MatchingRoom/index.tsx +++ b/src/pages/Chats/MatchingRoom/index.tsx @@ -56,6 +56,7 @@ const MatchingRoom: React.FC = () => { useEffect(() => { // 전체 매칭 불러오기 socket api const getAllMatchings = ({ matching }: { matching: MatchingData[] }) => { + console.log(matching); setAllMatchings(matching); setIsScroll(true); setIsLoading(false); @@ -70,16 +71,23 @@ const MatchingRoom: React.FC = () => { } }; + const handleError = (data: string) => { + alert(data); + }; + if (socket) { socket.emit('getAllMatchings', { userId: currentUserId }); socket.emit('getMatching', { userId: currentUserId }); socket.on('matchings', getAllMatchings); socket.on('nextMatching', getNewMatching); + socket.on('error', handleError); } return () => { if (socket) { - socket.off(); + socket.off('matchings'); + socket.off('nextMatching'); + socket.off('error'); } }; }, [socket]); @@ -103,6 +111,7 @@ const MatchingRoom: React.FC = () => {
diff --git a/src/pages/Chats/RcvdMessage/index.tsx b/src/pages/Chats/RcvdMessage/index.tsx index 01ac329d..3bbfae2b 100644 --- a/src/pages/Chats/RcvdMessage/index.tsx +++ b/src/pages/Chats/RcvdMessage/index.tsx @@ -22,7 +22,7 @@ const RcvdMessage: React.FC void; ch return ( - +
void; ch > {fromUserNickname} - - {children} - {content} - - - {isTimeVisible && {formattedTime}} + + + {children} + {content} + + {isTimeVisible && {formattedTime}} + +
); } else { diff --git a/src/pages/Chats/RcvdMessage/styles.tsx b/src/pages/Chats/RcvdMessage/styles.tsx index ee11e142..4252a598 100644 --- a/src/pages/Chats/RcvdMessage/styles.tsx +++ b/src/pages/Chats/RcvdMessage/styles.tsx @@ -24,13 +24,12 @@ export const UserImage = styled.img` export const UsernameText = styled(StyledText)` cursor: pointer; + margin-bottom: 0.2rem; `; export const MessageBox = styled.div` display: flex; - flex-direction: column; gap: 0.2rem; - /* max-width: 75%; */ margin-right: 0.5rem; `; diff --git a/src/pages/Chats/RecentChat/ChatRoomItem/index.tsx b/src/pages/Chats/RecentChat/ChatRoomItem/index.tsx index 6e04a3d5..e7f825d9 100644 --- a/src/pages/Chats/RecentChat/ChatRoomItem/index.tsx +++ b/src/pages/Chats/RecentChat/ChatRoomItem/index.tsx @@ -52,7 +52,7 @@ const ChatRoomItem: React.FC = ({ id, otherUser, latestMessage }) {otherUser?.nickname || '알수없음'} - + {latestMessage.content} diff --git a/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx b/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx index 9ce9d0aa..5de67548 100644 --- a/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx +++ b/src/pages/Chats/RecentChat/MatchingRoomItem/index.tsx @@ -47,7 +47,7 @@ const MatchingRoomItem: React.FC> = ({ requestStatus 오딩이 - + {requestStatus === 'pending' ? '얘가 너 소개받고 싶대' : '매칭이 들어오면 오딩이가 알려줄게!'}