Feat: Week7/nonshaman-m1#69
Open
nonshaman wants to merge 15 commits into
Open
Conversation
Feat: Week3/nonshaman m1
feat: 3주차 미션 2 진행 (fix)
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
yewon20804
reviewed
May 19, 2026
Collaborator
yewon20804
left a comment
There was a problem hiding this comment.
7주차 미션 확인했습니다 ! 이번 미션은 useMutation을 활용해보는거였습니다 😀
코멘트 확인 부탁드립니다 ~
1. lp.ts — getLpDetail 반환 타입 오류
// ❌ 현재
export const getLpDetail = async ({ lpId }: RequestLpDto): Promise<RequestLpDto> => {
// ✅ 수정
export const getLpDetail = async ({ lpId }: RequestLpDto): Promise<ResponseLpDto> => {
요청 DTO를 반환 타입으로 사용하고 있습니다 ! 응답 타입인 ResponseLpDto로 바꿔주세요 !
2. usePostLike.ts — onSuccess의 미사용 매개변수 context
// ❌ 현재
onSuccess: (data: ResponseLikeLpDto, Variables: RequestLpDto, context) => {
// ✅ 수정
onSuccess: (data: ResponseLikeLpDto) => {
context가 선언만 되고 사용되지 않아 에러가 날 수 있습니다 !
3. LpDetailPage.tsx — as any 사용으로 타입 안전성 없음
// ❌ 현재
} = useGetLpDetail({lpId:Number(lpId)}) as any;
// ✅ 수정
} = useGetLpDetail({lpId:Number(lpId)});
as any를 쓰면 TypeScript를 사용하는 의미가 사라집니다 ! 가능한 경우에는 타입 추론을 그대로 사용하는 게 더 안전한 것 같습니다 :)
4. LpDetailPage.tsx — 로딩/에러 조건 오류
// ❌ 현재
if(isPending && isError) {
return <></>
}
// ✅ 수정
if (isPending) return <></>;
if (isError) return <div>에러가 발생했습니다.</div>;
isPending && isError는 동시에 true가 될 수 없습니다 !각각 분리해서 처리해주세요 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 주차 / 미션
📌 작업 내용
✨ 상세 작업 내용
📸 스크린샷
✅ 체크리스트