fix: 가게 등록, 전체 css 수정#86
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough서울 지역 등록 제한을 명시하고 관련 폼 검증/에러 처리를 추가·조정하며, 레이아웃과 네비게이션 일부 UI/클래스 오타를 수정한 변경입니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 분 Possibly related PRs
Suggested labels
Suggested reviewers
Poem
검토 포인트 (짧게, 근거·대안 포함)
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/store-registration/StepStoreInfo.tsx`:
- Around line 239-247: The Label component rendering the address field currently
mixes conflicting display classes ("flex" and "block") in its className; remove
the redundant "block" so the element uses the intended flex layout (update the
className on the Label element in StepStoreInfo.tsx to drop "block" and keep
"flex flex-wrap items-baseline ...").
🧹 Nitpick comments (1)
src/pages/myPage/StoreRegistrationPage.tsx (1)
132-139:error가 non-object일 때 런타임 에러 가능성이 있어요.
catch (error: any)에서error.response?.data에 접근하는데, 만약error가null이나 primitive 타입이면error.response에서 TypeError가 발생할 수 있어요. 실제로는 거의 발생하지 않지만, 방어적으로 작성하면 더 안전합니다.♻️ 더 안전한 에러 핸들링 제안
- } catch (error: any) { + } catch (error: unknown) { console.error("가게 등록 실패:", error); - const errorResponse = error.response?.data as ApiError; - if (errorResponse?.code === "REGION404") { + const errorResponse = ( + error != null && + typeof error === "object" && + "response" in error + ? (error as any).response?.data + : undefined + ) as ApiError | undefined; + if (errorResponse?.code === "REGION404") { alert("현재 서울 지역만 등록 가능합니다."); } else { alert(getErrorMessage(error)); }또는 axios를 사용 중이시라면
axios.isAxiosError(error)가드를 활용하는 것도 좋아요:import axios from "axios"; // ... } catch (error: unknown) { console.error("가게 등록 실패:", error); if (axios.isAxiosError(error) && error.response?.data?.code === "REGION404") { alert("현재 서울 지역만 등록 가능합니다."); } else { alert(getErrorMessage(error)); } }
💡 개요
🔢 관련 이슈 링크
💻 작업내용
📌 변경사항PR
🤔 추가 논의하고 싶은 내용
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트
버그 수정
UI/UX 개선