-
Notifications
You must be signed in to change notification settings - Fork 2
[UNI-140] feat : 제보 Form API 연결 #65
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
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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! 고생하셨습니다~
transform 패턴 아이디어는 매우 좋은 것 같습니다!
dangerTypes: IssueTypeKey[]; | ||
cautionTypes: IssueTypeKey[]; | ||
}> => { | ||
return getFetch<{ | ||
routeId: NodeId; | ||
dangerTypes: IssueTypeKey[]; | ||
cautionTypes: IssueTypeKey[]; |
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.
각 dangerTypes와 cautionTypes는 enum.d.ts의 DangerIssueType[] 으로 반영하면 더 엄격한 타입이 될 것 같습니다~
headers: { | ||
"Content-Type": "application/json", | ||
}, |
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.
제가 놓친 부분 수정 감사합니다~
#️⃣ 작업 내용
핵심 기능
Form State를 Enum Key Type으로 변경했습니다.
백엔드 요청이 전부 Key값으로 요청이 전달되어, Key값으로 State가 저장되도록 변경했습니다.
Form 로직 이슈 해결
useSuspenseQuery를 사용해 Form 데이터 Initialize
우선 길이 존재하지 않을 경우 케이스는 data.routeId를 -1 처리해 존재하지 않는 경로라고 처리했습니다.
post fetch 배열에 맞게 변경 및 response를 boolean으로 통일
제보 등록시 Mutation
동작 화면
데이터가 존재하고, 수정해야할 때
2025-02-06.17.54.17.mov
존재하지 않은 경로일 때
2025-02-06.17.54.50.mov