-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 코드리뷰 반영 #168
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
fix: 코드리뷰 반영 #168
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @dasosann, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 주로 코드 리뷰 피드백을 반영하여 코드 품질을 개선하고 불필요한 코드를 제거하는 데 중점을 둡니다. 앨범 생성 시 날짜 처리 로직을 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
코드 리뷰 내용을 잘 반영해주셨습니다. date-fns를 사용한 날짜 형식 리팩토링과 불필요한 console.log 및 상태 업데이트 로직 제거로 코드가 더 깔끔해졌습니다.
추가적으로 사진 삭제 로직을 검토하던 중, 데이터 정합성 관련하여 개선할 점을 발견하여 코멘트를 남겼습니다. handleDelete 함수에서 관련된 모든 react-query 캐시를 무효화하여 UI가 최신 상태를 올바르게 반영하도록 하는 것이 중요합니다. 확인 부탁드립니다.
| @@ -62,7 +55,6 @@ export default function FooterPhotoDetail({ | |||
| try { | |||
| await mutateAsyncDelete({ albumId, photoId }); | |||
| queryClient.invalidateQueries({ queryKey: [EP.album.photos(albumId)] }); | |||
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.
사진 삭제 후 photos 쿼리만 무효화하고 있습니다. 이로 인해 다른 관련 데이터(예: 좋아요 목록, 앨범 정보 등)가 오래된 상태로 남아있을 수 있습니다. 사진 삭제 시 앨범과 관련된 모든 쿼리를 무효화하여 데이터 정합성을 보장하는 것이 좋습니다.
photoDetail 쿼리를 무효화하면 현재 상세 페이지가 자동으로 업데이트되어 '삭제된 사진'임을 사용자에게 알리는 로직을 구현할 수도 있습니다.
queryClient.invalidateQueries({ queryKey: [EP.album.photos(albumId)] });
queryClient.invalidateQueries({ queryKey: [EP.album.photoDetail(albumId, photoId)] });
queryClient.invalidateQueries({ queryKey: [EP.album.likedPhotos(albumId)] });
queryClient.invalidateQueries({ queryKey: [EP.album.albumBest-4cut(albumId)] });
queryClient.invalidateQueries({ queryKey: [EP.album.availableCount(albumId)] });
queryClient.invalidateQueries({ queryKey: [EP.album.albumInfo(albumId)] });
요약
구현 사항
📸 스크린샷
Need Review
Reference
📜 리뷰 규칙
Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.