-
Notifications
You must be signed in to change notification settings - Fork 1
[Refactor/#119] 노트 생성 api 수정 #120
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
개요노트 추가 기능에서 제공된 노트 이름 매개변수를 실제로 서버 API에 전달하도록 수정했습니다. 변경사항
예상 코드 리뷰 난이도🎯 1 (단순함) | ⏱️ ~5분
추천 리뷰어
시 🐰
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✨ Storybook 확인: 🔗 https://6785fc0fb0ff9f8d21d80624-nidbkrwbog.chromatic.com/ |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/pages/archive/hooks/use-add-note.ts (1)
18-29: 노트 이름 전달 및 로딩/에러 상태 관리가 일관되게 잘 구현되어 있습니다
handleAddNote(noteName: string)에서addNote({ folderId, name: noteName })로 호출하도록 바뀌어,AddNoteRequest의name필수 필드와 타입 정합성이 잘 맞습니다.setIsAdding(true)후try/catch/finally로setIsAdding(false)를 보장하는 구조라, 실패 케이스에서도 로딩 상태가 정상적으로 해제되는 점도 좋습니다.- 실패 시
console.error와alert로 사용자/디버깅 모두에 피드백이 가는 것도 무난한 선택입니다.선택 사항이지만, 필요하다면:
noteName이 빈 문자열인 경우를 상위에서 막거나, 이 훅 내부에서 한 번 더 방어적으로 early return 하는 것도 UX 측면에서 고려해볼 수 있습니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/pages/archive/hooks/use-add-note.ts(1 hunks)src/types/note/note-request.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/archive/hooks/use-add-note.ts (1)
src/apis/note/note.ts (1)
addNote(52-54)
🔇 Additional comments (1)
src/types/note/note-request.ts (1)
60-63: AddNoteRequest의 name 필드 추가가 서버 스펙과 잘 맞습니다
WriteNoteRequest와 동일하게name: string을 필수로 둔 설계가 자연스럽고, 새 노트 생성 시 이름을 강제하도록 타입 측면에서 잘 잡아주고 있습니다.
단, 이제AddNoteRequest를 사용하는 모든 호출부에서name을 넘겨야 하므로, 다른 훅/모듈에서도 누락된 곳이 없는지만 한 번 빌드/타입체크로 확인해 주세요.
Summary
노트 생성 api 수정
Tasks
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.