fix: 계약 목록 - 계약 카테고리 null 값 안보이도록 수정#177
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the issue of displaying null values for contract categories by ensuring that contracts without a corresponding Korean label in the mapping are shown with a "-" label. It also refactors the inline sx styling for a Button component in the ContractEditModal for clearer formatting and alignment.
- Updated condition in RecentContractsModal to hide contract categories when no valid mapping exists.
- Reformatted sx styling and added a flex container in ContractEditModal to align the submit Button to the right.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/pages/DashboardPage/RecentContractsModal.tsx | Enhanced the check for contract.category to prevent rendering null values by verifying existence in the categoryKoreanMap. |
| src/pages/ContractListPage/ContractAddButtonList/ContractEditModal/ContractEditModal.tsx | Reformatted the inline sx styling for the submit Button and added a flex container for proper alignment. |
Comments suppressed due to low confidence (1)
src/pages/DashboardPage/RecentContractsModal.tsx:199
- The updated condition now returns '-' if there's no corresponding Korean label. Please ensure this change is thoroughly tested to confirm that no valid category label is inadvertently omitted.
if (!contract.category || !categoryKoreanMap[contract.category])
| sx={{ | ||
| mt: 2, | ||
| color: "white !important", | ||
| backgroundColor: "#164F9E", | ||
| }} |
There was a problem hiding this comment.
[nitpick] Consider extracting the Button's sx styling into a shared style constant if it will be reused elsewhere in the codebase to improve maintainability.
| sx={{ | |
| mt: 2, | |
| color: "white !important", | |
| backgroundColor: "#164F9E", | |
| }} | |
| sx={editButtonStyles} |
#️⃣연관된 이슈
#176
📝작업 내용
📸 스크린샷 (선택)
💬리뷰 요구사항(선택)