-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 내게 쓰기 404에러 수정 #147
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] 내게 쓰기 404에러 수정 #147
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough"내게 쓰기" 플로우에서 초안 저장 및 전송 시 Changes
Sequence Diagram(s)(해당 변경은 단일 파일의 흐름 조정으로, 다중 컴포넌트 간 새 시퀀스가 도입되지 않아 다이어그램을 생략합니다.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~8분 Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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://690458540424857aa71aec97-ilondhflvl.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: 1
♻️ Duplicate comments (1)
src/pages/letterPage/pages/letter-write-page.tsx (1)
100-102: 동일한 중복 할당 문제가 발생합니다.이 부분도 Lines 80-84와 동일한 문제가 있습니다. Line 101에서 설정한
boardShare?.shareUri값이 Line 102에서 즉시 덮어써집니다.🔎 제안된 수정 사항
Line 102를 제거하고 Line 101만 유지하세요:
const stored = localStorage.getItem(LOCALSTORAGE_KEY); const draft: Partial<MessageData> = stored ? JSON.parse(stored) : {}; draft.sender = authorName; // 내게 쓰기 흐름일 때는 자신의 보드 shareUri 사용 draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri) - draft.shareUri = shareUri ?? draft.shareUri ?? "";또는 두 로직을 하나로 통합:
const stored = localStorage.getItem(LOCALSTORAGE_KEY); const draft: Partial<MessageData> = stored ? JSON.parse(stored) : {}; draft.sender = authorName; // 내게 쓰기 흐름일 때는 자신의 보드 shareUri 사용 - draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri) - draft.shareUri = shareUri ?? draft.shareUri ?? ""; + draft.shareUri = shareUri ?? (isJoinPage ? boardShare?.shareUri : draft.shareUri) ?? "";
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/letterPage/pages/letter-write-page.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/pages/letterPage/pages/letter-write-page.tsx (1)
src/stores/useAuthStore.ts (1)
useAuthStore(20-75)
🔇 Additional comments (2)
src/pages/letterPage/pages/letter-write-page.tsx (2)
11-11: LGTM!
useAuthStore임포트가 올바르게 추가되었습니다. 내게 쓰기 흐름에서boardShare에 접근하기 위해 필요합니다.
19-19: LGTM!
boardShare추출이 올바르게 구현되었습니다. 인증된 사용자의 보드 정보를 가져오는 방식이 적절합니다.
Summary
해당 PR에 대한 작업 내용을 요약하여 작성해주세요.
Tasks
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.