Skip to content

Commit ce404ff

Browse files
authored
Merge pull request #89 from oodd-team/feat/OD-135
[OD-135] Chats 페이지 정비
2 parents 7a1e0e6 + 84c67d6 commit ce404ff

14 files changed

Lines changed: 25 additions & 23 deletions

File tree

.github/workflows/dev_cicd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- run: yarn build-dev
4040

4141
- name: deploy to s3
42+
if: github.event_name == 'push'
4243
uses: jakejarvis/s3-sync-action@master
4344
with:
4445
args: --delete

.github/workflows/prod_cicd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129
cicd:
@@ -39,6 +36,7 @@ jobs:
3936
- run: yarn build
4037

4138
- name: deploy to s3
39+
if: github.event_name == 'push'
4240
uses: jakejarvis/s3-sync-action@master
4341
with:
4442
args: --delete

src/apis/chatting/dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface ChatRoomData {
1010
export interface OtherUserDto {
1111
id: number;
1212
nickname: string;
13-
profilePictureUrl: string;
13+
profileUrl: string;
1414
}
1515

1616
export interface LatestMessageDto {

src/pages/Chats/ChatRoom/ChatBox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const ChatBox: React.FC = () => {
4646
const sendMessageRequest = {
4747
chatRoomId: Number(chatRoomId),
4848
toUserId: opponentInfo?.id,
49-
message: newMessage,
49+
content: newMessage,
5050
fromUserId: userId,
5151
createdAt: new Date().toISOString(),
5252
};

src/pages/Chats/ChatRoom/createExtendedMessages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const createExtendedMessages = (
5656
// 받은 메시지일 경우 rcvdMessage 속성 추가
5757
const rcvdMessage: RcvdMessageProps = {
5858
fromUserNickname: opponentInfo?.nickname || '알수없음',
59-
profilePictureUrl: opponentInfo?.profilePictureUrl || defaultProfile,
59+
profilePictureUrl: opponentInfo?.profileUrl || defaultProfile,
6060
content: message.content,
6161
isProfileImageVisible,
6262
isSenderChanged,

src/pages/Chats/ChatRoom/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ const ChatRoom: React.FC = () => {
130130

131131
// 컴포넌트 언마운트 시 실행
132132
return () => {
133-
if (socket.connected) {
134-
socket.removeListener('chatRoomMessages');
135-
socket.removeListener('newMessage');
133+
if (socket) {
134+
socket.off('chatRoomMessages');
135+
socket.off('newMessage');
136136
}
137137
};
138-
}, [chatRoomId]);
138+
}, [chatRoomId, socket]);
139139

140140
// 메시지 렌더링에 필요한 정보 추가
141141
useEffect(() => {

src/pages/Chats/ChatRoomItem/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const ChatRoomItem: React.FC<ChatRoomData> = ({ chatRoomId, otherUser, latestMes
4040

4141
return (
4242
<ChatRoomItemLayout onClick={onClickChatRoom}>
43-
<UserImage src={otherUser?.profilePictureUrl || defaultProfile} alt="user" />
43+
<UserImage src={otherUser?.profileUrl || defaultProfile} alt="user" />
4444
<LeftBox>
4545
<StyledText $textTheme={{ style: 'body2-medium' }} color="#1D1D1D">
4646
{otherUser?.nickname || '알수없음'}

src/pages/Chats/Request/Cards/Card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Card: React.FC<CardProps> = ({ removeRejectedMatching, matching }) => {
5555
setOpponentInfo({
5656
id: requester.requesterId,
5757
nickname: requester.nickname,
58-
profilePictureUrl: requester.profilePictureUrl,
58+
profileUrl: requester.profilePictureUrl,
5959
});
6060
nav(`/chats/${response.data.chatRoomId}`);
6161
}

src/pages/Chats/Request/Cards/Card/styles.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const OOTDImgBox = styled.div`
8787
.childSwiper .swiper-slide {
8888
display: flex;
8989
justify-content: center;
90+
transform: scale(1);
9091
}
9192
9293
.childSwiper .swiper-pagination {

src/pages/Chats/Request/Cards/styles.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ export const CardsContainer = styled.div`
66
77
.parentSwiper {
88
width: 100%;
9+
z-index: 10;
910
}
1011
11-
.parentSwiper.swiper-slide {
12+
.parentSwiper .swiper-slide {
1213
transition: transform 0.3s;
1314
transform: scale(0.95);
1415
}
1516
16-
.parentSwiper.swiper-slide-active {
17+
.parentSwiper .swiper-slide-active {
1718
transform: scale(1);
1819
}
1920
20-
.parentSwiper.swiper-slide-next,
21-
.parentSwiper.swiper-slide-prev {
21+
.parentSwiper .swiper-slide-next,
22+
.parentSwiper .swiper-slide-prev {
2223
transform: scale(0.95);
2324
}
2425

0 commit comments

Comments
 (0)