Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NDD-147] 마이페이지 영상 삭제 기능 구현 (1h/2h) #96

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

milk717
Copy link
Collaborator

@milk717 milk717 commented Nov 22, 2023

NDD-147 Powered by Pull Request Badge

Why

쿼리가 모두 정의되어 있어서 사실상 더 빨리 마무리되는 작업인데 msw 이슈로 인해 1시간이 소요되었습니다.

How

MSW 204응답 이슈

 http.delete(API.VIDEO_ID(), () => {
    return HttpResponse.json(null, { status: 204 });
  }),

기존에는 위와 같이 status 204 코드로 body 없는 응답을 목업해주었습니다.
하지만 저 요청을 보냈을 때 204 응답에는 body가 포함되면 안된다는 에러를 만나게 되었습니다.
그래서 MSW 공식문서의 에러 응답에 대한 설명을 참고해서 아래와 같이 변경했습니다.

  http.delete(API.VIDEO_ID(), () => {
    return new HttpResponse(null, { status: 204 });
  }),

영상 삭제 기능

마이페이지 전체 리스트에서 영상 썸네일에 호버시 삭제 아이콘이 떠서 삭제할 수 있도록 했습니다.

Result

image image

@milk717 milk717 added FE 프론트엔드 코드 변경사항 feature 새로운 기능이 추가 된 경우 labels Nov 22, 2023
@milk717 milk717 self-assigned this Nov 22, 2023
Copy link
Collaborator

@Yoon-Hae-Min Yoon-Hae-Min left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(경) 마이페이지 완성 (축)

const queryClient = useQueryClient();
return useMutation({
mutationFn: () => deleteVideoById(videoId),
mutationFn: deleteVideoById,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[p-5] 이제 정말 파라미터를 다 떼어버리는거야~

@@ -19,11 +24,12 @@ const CardCover: React.FC<CardCoverProps> = ({ children, borderRadius }) => {
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.3);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[p-5] 저희 디자인 시스템도 한번 정의가 필요할 듯 하네요 ㅠㅠ 저도 저렇게 썼는데 슬슬 디자인 시스템에서 하나씩 엇나가는게 보이네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인정합니다! 현재 검정색 투명도 조절 색상이 많아서 이것도 테마에 추가해야겠네요!

Copy link
Collaborator

@adultlee adultlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

모두 확인했습니다 고생하셨어요!!

@milk717 milk717 merged commit e384e08 into dev Nov 22, 2023
1 check passed
@milk717 milk717 deleted the feature/NDD-147 branch November 23, 2023 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 코드 변경사항 feature 새로운 기능이 추가 된 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants