-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a9d6304
refactor: mutate 실행시마다 인자를 받도록 훅 수정
milk717 b129f7a
feat: 영상 삭제 모달 컴포넌트 생성
milk717 df45de6
feat: CardCover에서 css를 받도록 수정
milk717 3fab3e9
fix: msw에서 204 응답시 바디에 null을 전달해도 오류가 발생하는 문제 수정
milk717 92073a8
feat: 마이페이지 영상 삭제 기능 구현
milk717 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Modal from '@foundation/Modal'; | ||
import React from 'react'; | ||
import Typography from '@foundation/Typography/Typography'; | ||
import Button from '@foundation/Button/Button'; | ||
import LightButton from '@common/LightButton/LightButton'; | ||
import { css } from '@emotion/react'; | ||
|
||
type DeleteCheckModalProps = { | ||
isOpen: boolean; | ||
content: string; | ||
closeModal: () => void; | ||
confirmModal: () => void; | ||
}; | ||
const DeleteCheckModal: React.FC<DeleteCheckModalProps> = ({ | ||
isOpen, | ||
content, | ||
closeModal, | ||
confirmModal, | ||
}) => { | ||
return ( | ||
<Modal isOpen={isOpen} closeModal={closeModal}> | ||
<Modal.content> | ||
<Typography variant="title4">{content}</Typography> | ||
</Modal.content> | ||
<Modal.footer> | ||
<div | ||
css={css` | ||
display: flex; | ||
justify-content: flex-end; | ||
column-gap: 0.5rem; | ||
`} | ||
> | ||
<LightButton onClick={closeModal}>취소</LightButton> | ||
<Button onClick={confirmModal}>확인</Button> | ||
</div> | ||
</Modal.footer> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default DeleteCheckModal; |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ import { QUERY_KEY } from '@/constants/queryKey'; | |
import { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
import { deleteVideoById } from '@/apis/video'; | ||
|
||
const useDeleteVideoMutation = (videoId: number) => { | ||
const useDeleteVideoMutation = () => { | ||
const queryClient = useQueryClient(); | ||
return useMutation({ | ||
mutationFn: () => deleteVideoById(videoId), | ||
mutationFn: deleteVideoById, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [p-5] 이제 정말 파라미터를 다 떼어버리는거야~ |
||
onSuccess: () => { | ||
void queryClient.invalidateQueries({ | ||
queryKey: QUERY_KEY.VIDEO, | ||
|
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[p-5] 저희 디자인 시스템도 한번 정의가 필요할 듯 하네요 ㅠㅠ 저도 저렇게 썼는데 슬슬 디자인 시스템에서 하나씩 엇나가는게 보이네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
인정합니다! 현재 검정색 투명도 조절 색상이 많아서 이것도 테마에 추가해야겠네요!