-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feat] 휴지통 뷰 영구삭제 및 복구 api 연결 #374
base: develop
Are you sure you want to change the base?
Conversation
…to feature/deleted/#360-deleted-for-good-api
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.
api 연결 고생하셨슴니다 ㅎㅎㅎ👍🏻
어떤 부분에서 useQuery -> useMutation으로 변경하신건지 궁금하네용 !!
refetch(); | ||
}, | ||
onError: (error) => { | ||
console.error('삭제 실패:', error); |
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.
저희 기존에 만들어놓은 toast
사용해서 삭제 실패시와 완료시 문구 띄워주는 것도 좋을 것 같넹요!!
const restoreMutation = $api.useMutation('post', '/api/v1/teams/{teamId}/trash', { | ||
onSuccess: () => { | ||
refetch(); | ||
}, | ||
onError: (error) => { | ||
console.error('복원 실패:', error); | ||
}, | ||
}); |
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.
$api를 사용한 mutation 코드들을 앞에서 쫙 선언해주고 핸들러들을 그 다음에 선언해주는 건 어떠신가요 ?
저의 코드스타일이기도 하지만 mutation, query 상수들을 묶어서 선언해주는 게 더 깔끔해보일 것 같다는 생각입니다..!
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.
LGTM!!!!
|
||
const restoreMutation = $api.useMutation('post', '/api/v1/teams/{teamId}/trash', { | ||
onSuccess: () => { | ||
refetch(); |
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.
오호 삭제하면 reftch 해주기! 저도 이렇게 구현해야겠네요ㅎ
해당 이슈 번호
closed #360
체크리스트
📌 내가 알게 된 부분
💎 PR Point
📌스크린샷
2025-01-04.195016.mp4
동영상에서 10은 복구하고 나머지는 삭제했는데 마지막에 파일에 10이 복구되고 나머진 삭제된 걸 볼 수 있습니다.