@@ -26,18 +26,18 @@ import { handleError } from '@apis/util/handleError';
2626import type { ModalProps } from '@components/Modal/dto' ;
2727import Modal from '@components/Modal' ;
2828import { useRecoilState } from 'recoil' ;
29- import { OpponentInfoAtom } from '@recoil/util/OpponentInfo ' ;
29+ import { OtherUserAtom } from '@recoil/util/OtherUser ' ;
3030import type { CardProps } from './dto' ;
3131
3232const Card : React . FC < CardProps > = ( { removeRejectedMatching, matching } ) => {
3333 const [ isStatusModalOpen , setIsStatusModalOpen ] = useState ( false ) ;
3434 const [ modalContent , setModalContent ] = useState ( '알 수 없는 오류가 발생했습니다.\n관리자에게 문의해 주세요.' ) ;
35- const [ , setOpponentInfo ] = useRecoilState ( OpponentInfoAtom ) ;
35+ const [ , setOtherUser ] = useRecoilState ( OtherUserAtom ) ;
3636 const nav = useNavigate ( ) ;
3737 const requester = matching . requester ;
3838
3939 const handleUserClick = ( ) => {
40- nav ( `/users/${ matching . requester . requesterId } ` ) ;
40+ nav ( `/users/${ requester . id } ` ) ;
4141 } ;
4242
4343 const handleRejectButtonClick = ( ) => {
@@ -52,16 +52,16 @@ const Card: React.FC<CardProps> = ({ removeRejectedMatching, matching }) => {
5252 const modifyMatchingStatus = async ( status : 'accept' | 'reject' ) => {
5353 try {
5454 console . log ( matching ) ;
55- const response = await modifyMatchingStatusApi ( matching . matchingId , { requestStatus : status } ) ;
55+ const response = await modifyMatchingStatusApi ( matching . id , { requestStatus : status } ) ;
5656
5757 if ( response . isSuccess ) {
5858 removeRejectedMatching ( ) ; // 매칭 리스트에서 해당 매칭을 제거
5959
6060 if ( status === 'accept' ) {
61- setOpponentInfo ( {
62- id : requester . requesterId ,
61+ setOtherUser ( {
62+ id : requester . id ,
6363 nickname : requester . nickname ,
64- profileUrl : requester . profilePictureUrl ,
64+ profilePictureUrl : requester . profilePictureUrl ,
6565 } ) ;
6666 nav ( `/chats/${ response . data . chatRoomId } ` ) ;
6767 }
@@ -91,12 +91,12 @@ const Card: React.FC<CardProps> = ({ removeRejectedMatching, matching }) => {
9191 { requester . nickname || '알수없음' }
9292 </ StyledText >
9393 < div className = "row-flex" >
94- { matching . requesterPost . styleTags . map ( ( tag , index ) => (
94+ { requester . representativePost . styleTags . map ( ( tag , index ) => (
9595 < div className = "row-flex" key = { tag } >
9696 < StyledText $textTheme = { { style : 'caption2-regular' } } color = { theme . colors . gray1 } >
9797 { tag }
9898 </ StyledText >
99- { index < matching . requesterPost . styleTags . length - 1 && (
99+ { index < requester . representativePost . styleTags . length - 1 && (
100100 < StyledText $textTheme = { { style : 'caption2-regular' } } color = { theme . colors . gray1 } >
101101 ,
102102 </ StyledText >
@@ -105,7 +105,7 @@ const Card: React.FC<CardProps> = ({ removeRejectedMatching, matching }) => {
105105 ) ) }
106106 </ div >
107107 </ ProfileInfo >
108- < SeeMore onClick = { ( ) => nav ( `/users/${ requester . requesterId } ` ) } >
108+ < SeeMore onClick = { ( ) => nav ( `/users/${ requester . id } ` ) } >
109109 < StyledText $textTheme = { { style : 'caption2-regular' } } color = "#8e8e93" >
110110 OOTD 더 보기
111111 </ StyledText >
@@ -123,7 +123,7 @@ const Card: React.FC<CardProps> = ({ removeRejectedMatching, matching }) => {
123123 modules = { [ Pagination ] }
124124 className = "childSwiper"
125125 >
126- { matching . requesterPost . postImages . map ( ( postImage ) => (
126+ { requester . representativePost . postImages . map ( ( postImage ) => (
127127 < SwiperSlide key = { postImage . url } >
128128 < img src = { postImage . url } alt = "OOTD" className = "slide-image-small" />
129129 < div className = "blur" > </ div >
0 commit comments