From bad0d1fafd6954027c8bedb7cbfa772895be2397 Mon Sep 17 00:00:00 2001 From: fr0gydev Date: Thu, 21 Aug 2025 09:18:15 +0900 Subject: [PATCH 1/6] =?UTF-8?q?fix:=20=ED=94=BC=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=B0=98=EC=98=81=20=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=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/post/UpdatePost.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/post/UpdatePost.tsx b/src/pages/post/UpdatePost.tsx index 597b4d16..a7bd65e2 100644 --- a/src/pages/post/UpdatePost.tsx +++ b/src/pages/post/UpdatePost.tsx @@ -108,7 +108,7 @@ const UpdatePost = () => { contentBody: postContent.trim(), isPublic: !isPrivate, ...(selectedTags.length ? { tagList: selectedTags } : {}), - ...(remainImageUrls.length ? { remainImageUrls } : {}), + remainImageUrls, // 이미지가 없어도 빈 배열로 전송하여 삭제 처리 }; const result = await updateExistingFeed(Number(feedId), body); From 4859ad9b58bffd287a8b5925305e28eb3fd0ac1e Mon Sep 17 00:00:00 2001 From: fr0gydev Date: Thu, 21 Aug 2025 09:35:54 +0900 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20=EB=AA=A8=EC=9E=84=EB=B0=A9=20?= =?UTF-8?q?=EA=B8=B0=EB=A1=9D=EC=9E=A5,=20=EC=98=A4=EB=8A=98=EC=9D=98=20?= =?UTF-8?q?=ED=95=9C=EB=A7=88=EB=94=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=A0=84=EC=B2=B4=20=ED=81=B4=EB=A6=AD=20=EC=98=81?= =?UTF-8?q?=EC=97=AD=EC=9C=BC=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/components/group/CommentSection.styled.ts | 2 +- src/components/group/CommentSection.tsx | 4 ++-- src/components/group/RecordSection.styled.ts | 2 +- src/components/group/RecordSection.tsx | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/group/CommentSection.styled.ts b/src/components/group/CommentSection.styled.ts index a1e036ed..aac581d0 100644 --- a/src/components/group/CommentSection.styled.ts +++ b/src/components/group/CommentSection.styled.ts @@ -10,13 +10,13 @@ export const CommentSection = styled.section` margin: 20px 20px 0 20px; padding: 16px 12px; border-radius: 12px; + cursor: pointer; `; export const CommentSectionHeader = styled.div` display: flex; justify-content: space-between; align-items: center; - cursor: pointer; `; export const CommentSectionTitle = styled.h3` diff --git a/src/components/group/CommentSection.tsx b/src/components/group/CommentSection.tsx index 6b38671c..0ee734e1 100644 --- a/src/components/group/CommentSection.tsx +++ b/src/components/group/CommentSection.tsx @@ -15,8 +15,8 @@ interface CommentSectionProps { const CommentSection = ({ message, onClick }: CommentSectionProps) => { return ( - - + + 오늘의 한마디 diff --git a/src/components/group/RecordSection.styled.ts b/src/components/group/RecordSection.styled.ts index 3ff17e12..f675f5bc 100644 --- a/src/components/group/RecordSection.styled.ts +++ b/src/components/group/RecordSection.styled.ts @@ -10,13 +10,13 @@ export const RecordSection = styled.section` margin: 20px 20px 0 20px; padding: 16px 12px; border-radius: 12px; + cursor: pointer; `; export const RecordSectionHeader = styled.div` display: flex; justify-content: space-between; align-items: center; - cursor: pointer; `; export const RecordSectionTitle = styled.h3` diff --git a/src/components/group/RecordSection.tsx b/src/components/group/RecordSection.tsx index e3d34de7..4542bf02 100644 --- a/src/components/group/RecordSection.tsx +++ b/src/components/group/RecordSection.tsx @@ -20,8 +20,8 @@ interface RecordSectionProps { const RecordSection = ({ currentPage, progress, onClick }: RecordSectionProps) => { return ( - - + + 기록장 From c243dfec700b85090983b9aff04a5f19c9dd57e1 Mon Sep 17 00:00:00 2001 From: fr0gydev Date: Thu, 21 Aug 2025 09:46:18 +0900 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=EC=A2=85=EB=A3=8C=EC=9D=BC=EC=9D=80?= =?UTF-8?q?=20+2=EC=9D=BC=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 --- .../creategroup/ActivityPeriodSection/ActivityPeriodSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/creategroup/ActivityPeriodSection/ActivityPeriodSection.tsx b/src/components/creategroup/ActivityPeriodSection/ActivityPeriodSection.tsx index 9b24e91d..31d2579b 100644 --- a/src/components/creategroup/ActivityPeriodSection/ActivityPeriodSection.tsx +++ b/src/components/creategroup/ActivityPeriodSection/ActivityPeriodSection.tsx @@ -87,7 +87,7 @@ const ActivityPeriodSection = ({ const getInitialEndDate = () => { const tomorrow = new Date(); - tomorrow.setDate(tomorrow.getDate() + 1); + tomorrow.setDate(tomorrow.getDate() + 2); return { year: tomorrow.getFullYear(), month: tomorrow.getMonth() + 1, From c9ba2a95aa0abf40fb9cf683448d2045425bec1e Mon Sep 17 00:00:00 2001 From: fr0gydev Date: Thu, 21 Aug 2025 09:51:38 +0900 Subject: [PATCH 4/6] =?UTF-8?q?refactor:=20=EB=AA=A8=EC=9E=84=20=EB=A7=8C?= =?UTF-8?q?=EB=93=A4=EA=B8=B0=20=EC=83=9D=EC=84=B1=EC=8B=9C=20=EA=B0=81=20?= =?UTF-8?q?=ED=95=AD=EB=AA=A9=EB=A7=88=EB=8B=A4=20=EB=94=94=EB=B0=94?= =?UTF-8?q?=EC=9D=B4=EB=8D=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/creategroup/GenreSelectionSection.tsx | 1 + src/components/creategroup/MemberLimitSection.tsx | 1 + .../PrivacySettingSection/PrivacySettingSection.tsx | 1 + src/components/creategroup/RoomInfoSection.tsx | 3 +++ 4 files changed, 6 insertions(+) diff --git a/src/components/creategroup/GenreSelectionSection.tsx b/src/components/creategroup/GenreSelectionSection.tsx index c8376685..dbb7d285 100644 --- a/src/components/creategroup/GenreSelectionSection.tsx +++ b/src/components/creategroup/GenreSelectionSection.tsx @@ -12,6 +12,7 @@ const GenreSelectionSection = ({ selectedGenre, onGenreSelect }: GenreSelectionS return (
+
책 장르 {genres.map(genre => ( diff --git a/src/components/creategroup/MemberLimitSection.tsx b/src/components/creategroup/MemberLimitSection.tsx index 6ba5d4bf..74e1b739 100644 --- a/src/components/creategroup/MemberLimitSection.tsx +++ b/src/components/creategroup/MemberLimitSection.tsx @@ -17,6 +17,7 @@ const MemberLimitSection = ({ memberLimit, onMemberLimitChange }: MemberLimitSec return (
+
인원 제한 diff --git a/src/components/creategroup/PrivacySettingSection/PrivacySettingSection.tsx b/src/components/creategroup/PrivacySettingSection/PrivacySettingSection.tsx index 02ae3f9d..7921feb2 100644 --- a/src/components/creategroup/PrivacySettingSection/PrivacySettingSection.tsx +++ b/src/components/creategroup/PrivacySettingSection/PrivacySettingSection.tsx @@ -24,6 +24,7 @@ const PrivacySettingSection = ({ }: PrivacySettingSectionProps) => { return (
+
공개 설정 비공개로 설정하기 diff --git a/src/components/creategroup/RoomInfoSection.tsx b/src/components/creategroup/RoomInfoSection.tsx index e3b5f48c..2629d35d 100644 --- a/src/components/creategroup/RoomInfoSection.tsx +++ b/src/components/creategroup/RoomInfoSection.tsx @@ -16,6 +16,7 @@ const RoomInfoSection = ({ }: RoomInfoSectionProps) => { return ( <> +
방 제목 @@ -45,6 +46,8 @@ const RoomInfoSection = ({ {roomDescription.length} / 75
+ +
); }; From 1151c7912aa368ce1855b5edec16d7472a0de886 Mon Sep 17 00:00:00 2001 From: fr0gydev Date: Thu, 21 Aug 2025 09:58:57 +0900 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=ED=88=AC=ED=91=9C=EC=97=90=20?= =?UTF-8?q?=ED=95=80=ED=95=98=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/memory/RecordItem/RecordItem.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/memory/RecordItem/RecordItem.tsx b/src/components/memory/RecordItem/RecordItem.tsx index b41ff663..8d8645a4 100644 --- a/src/components/memory/RecordItem/RecordItem.tsx +++ b/src/components/memory/RecordItem/RecordItem.tsx @@ -269,14 +269,20 @@ const RecordItem = ({ record, shouldBlur = false }: RecordItemProps) => { const handleClick = useCallback(() => { // 클릭으로 더보기 메뉴 표시 if (isMyRecord) { - openMoreMenu({ + const menuOptions: any = { onEdit: handleEdit, onDelete: handleDeleteConfirm, - onPin: handlePinConfirm, onClose: closePopup, type: 'post', isWriter: true, - }); + }; + + // 기록(text)일 때만 핀하기 기능 추가 + if (type === 'text') { + menuOptions.onPin = handlePinConfirm; + } + + openMoreMenu(menuOptions); } else { openMoreMenu({ onReport: handleReport, @@ -285,6 +291,7 @@ const RecordItem = ({ record, shouldBlur = false }: RecordItemProps) => { } }, [ isMyRecord, + type, openMoreMenu, handleReport, handleEdit, @@ -365,7 +372,7 @@ const RecordItem = ({ record, shouldBlur = false }: RecordItemProps) => { 댓글 {commentCount} - {isMyRecord && ( + {isMyRecord && type === 'text' && ( Date: Thu, 21 Aug 2025 10:03:28 +0900 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20API=20=EC=97=90=EB=9F=AC=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/rooms/getRoomDetail.ts | 13 ++++++++++++- src/api/rooms/getRoomMembers.ts | 8 +++++++- src/api/rooms/getRoomPlaying.ts | 8 +++++++- src/pages/groupDetail/GroupDetail.tsx | 15 ++++++++++++++- src/pages/groupDetail/ParticipatedGroupDetail.tsx | 11 +++++++++-- src/pages/groupMembers/GroupMembers.tsx | 11 +++++++++-- 6 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/api/rooms/getRoomDetail.ts b/src/api/rooms/getRoomDetail.ts index c3954430..123c480a 100644 --- a/src/api/rooms/getRoomDetail.ts +++ b/src/api/rooms/getRoomDetail.ts @@ -42,8 +42,19 @@ export const getRoomDetail = async (roomId: number): Promise try { const response = await apiClient.get(`/rooms/${roomId}/recruiting`); return response.data; - } catch (error) { + } catch (error: any) { console.error('방 상세 정보 조회 API 오류:', error); + + // 모집기간이 만료된 방인 경우 + if (error.response?.data?.code === 100004) { + throw new Error('모집기간이 만료된 방입니다.'); + } + + // 방 접근 권한이 없는 경우 + if (error.response?.data?.code === 140011) { + throw new Error('방 접근 권한이 없습니다.'); + } + throw error; } }; diff --git a/src/api/rooms/getRoomMembers.ts b/src/api/rooms/getRoomMembers.ts index 2ba7f589..b7212013 100644 --- a/src/api/rooms/getRoomMembers.ts +++ b/src/api/rooms/getRoomMembers.ts @@ -47,8 +47,14 @@ export const getRoomMembers = async (roomId: number): Promise(`/rooms/${roomId}/users`); return response.data; - } catch (error) { + } catch (error: any) { console.error('독서메이트 조회 API 오류:', error); + + // 방 접근 권한이 없는 경우 + if (error.response?.data?.code === 140011) { + throw new Error('방 접근 권한이 없습니다.'); + } + throw error; } }; diff --git a/src/api/rooms/getRoomPlaying.ts b/src/api/rooms/getRoomPlaying.ts index f19a120a..1d2fa5fa 100644 --- a/src/api/rooms/getRoomPlaying.ts +++ b/src/api/rooms/getRoomPlaying.ts @@ -65,8 +65,14 @@ export const getRoomPlaying = async (roomId: number): Promise(`/rooms/${roomId}/playing`); return response.data; - } catch (error) { + } catch (error: any) { console.error('진행중인 방 상세 정보 조회 API 오류:', error); + + // 방 접근 권한이 없는 경우 + if (error.response?.data?.code === 140011) { + throw new Error('방 접근 권한이 없습니다.'); + } + throw error; } }; diff --git a/src/pages/groupDetail/GroupDetail.tsx b/src/pages/groupDetail/GroupDetail.tsx index 4e66d783..e202a61a 100644 --- a/src/pages/groupDetail/GroupDetail.tsx +++ b/src/pages/groupDetail/GroupDetail.tsx @@ -97,8 +97,21 @@ const GroupDetail = () => { } else { setError(response.message); } - } catch (error) { + } catch (error: any) { console.error('방 상세 정보 조회 실패:', error); + + // 모집기간이 만료된 방인 경우 - 진행중인 방으로 리다이렉트 + if (error.message === '모집기간이 만료된 방입니다.') { + navigate(`/group/detail/joined/${roomId}`, { replace: true }); + return; + } + + // 방 접근 권한이 없는 경우 - 모임 홈으로 리다이렉트 + if (error.message === '방 접근 권한이 없습니다.') { + navigate('/group', { replace: true }); + return; + } + setError('방 정보를 불러오는데 실패했습니다.'); } finally { setIsLoading(false); diff --git a/src/pages/groupDetail/ParticipatedGroupDetail.tsx b/src/pages/groupDetail/ParticipatedGroupDetail.tsx index b4756947..9be1d572 100644 --- a/src/pages/groupDetail/ParticipatedGroupDetail.tsx +++ b/src/pages/groupDetail/ParticipatedGroupDetail.tsx @@ -74,9 +74,16 @@ const ParticipatedGroupDetail = () => { } else { setError(response.message); } - } catch (err) { - setError('방 정보를 불러오는 중 오류가 발생했습니다.'); + } catch (err: any) { console.error('방 상세 정보 조회 오류:', err); + + // 방 접근 권한이 없는 경우 - 모임 홈으로 리다이렉트 + if (err.message === '방 접근 권한이 없습니다.') { + navigate('/group', { replace: true }); + return; + } + + setError('방 정보를 불러오는 중 오류가 발생했습니다.'); } finally { setLoading(false); } diff --git a/src/pages/groupMembers/GroupMembers.tsx b/src/pages/groupMembers/GroupMembers.tsx index a0886427..0eb988e3 100644 --- a/src/pages/groupMembers/GroupMembers.tsx +++ b/src/pages/groupMembers/GroupMembers.tsx @@ -42,9 +42,16 @@ const GroupMembers = () => { } else { setError(response.message); } - } catch (err) { - setError('독서메이트 목록을 불러오는 중 오류가 발생했습니다.'); + } catch (err: any) { console.error('독서메이트 조회 오류:', err); + + // 방 접근 권한이 없는 경우 - 모임 홈으로 리다이렉트 + if (err.message === '방 접근 권한이 없습니다.') { + navigate('/group', { replace: true }); + return; + } + + setError('독서메이트 목록을 불러오는 중 오류가 발생했습니다.'); } finally { setLoading(false); }