-
Notifications
You must be signed in to change notification settings - Fork 2
[fix] 결과 페이지 UI 불일치 해결 #434
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
base: develop
Are you sure you want to change the base?
Changes from all commits
730fa15
60f16d5
a8b0a73
cd360a9
9efb342
8d756fc
380d37f
ab56da7
da91cd7
915b99f
2f52a00
14d6d0e
bc1c417
4e33dc2
00be40d
9e054d9
f45f323
2a602ba
e619efa
7a31daf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { style } from '@vanilla-extract/css'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { globalStyle, style } from '@vanilla-extract/css'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { recipe } from '@vanilla-extract/recipes'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // import { zIndex } from '@/shared/styles/tokens/zIndex'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -75,25 +75,55 @@ export const slideNumSkeleton = style({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| animation: `${animationTokens.skeletonWave} 1.6s ease-in-out infinite`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const slideBtnCircle = style({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'absolute', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| top: '50%', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: '50%', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: 'translate(-50%, -50%)', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: '2.4rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| height: '2.4rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderRadius: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pointerEvents: 'none', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transition: 'opacity 0.2s ease-in-out', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const slideBtnIcon = style({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'relative', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| height: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| display: 'flex', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alignItems: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| justifyContent: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slideBtnIcon} > svg`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| height: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const slidePrevBtn = style({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position: 'absolute', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| display: 'flex', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alignItems: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| justifyContent: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bottom: '50%', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| left: '0.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| top: 'calc(50% + 0.8rem)', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: 'translateY(-50%)', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: '3.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| height: '3.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_30, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderRadius: '99.9rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| padding: 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| border: 'none', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background: 'transparent', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| appearance: 'none', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WebkitTapHighlightColor: 'transparent', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ':active': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_50, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ':disabled': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_04, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| selectors: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '&:disabled': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cursor: 'default', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -102,21 +132,47 @@ export const slideNextBtn = style({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| display: 'flex', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alignItems: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| justifyContent: 'center', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| right: '1.2rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bottom: '50%', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| right: '0.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| top: 'calc(50% + 0.8rem)', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: 'translateY(-50%)', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width: '3.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| height: '3.6rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_30, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| borderRadius: '99.9rem', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| padding: 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| border: 'none', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| background: 'transparent', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| appearance: 'none', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WebkitTapHighlightColor: 'transparent', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| zIndex: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ':active': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_50, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| selectors: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '&:disabled': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cursor: 'default', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ':disabled': { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backgroundColor: colorVars.color.gray999_04, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slidePrevBtn} ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.3, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slidePrevBtn}:active:not(:disabled) ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.5, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slidePrevBtn}:disabled ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.04, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slideNextBtn} ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.3, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slideNextBtn}:active:not(:disabled) ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.5, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| globalStyle(`${slideNextBtn}:disabled ${slideBtnCircle}`, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| opacity: 0.04, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+154
to
176
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Prev/Next 버튼의
♻️ 통합 제안-globalStyle(`${slidePrevBtn} ${slideBtnCircle}`, {
- opacity: 0.3,
-});
-
-globalStyle(`${slidePrevBtn}:active:not(:disabled) ${slideBtnCircle}`, {
- opacity: 0.5,
-});
-
-globalStyle(`${slidePrevBtn}:disabled ${slideBtnCircle}`, {
- opacity: 0.04,
-});
-
-globalStyle(`${slideNextBtn} ${slideBtnCircle}`, {
- opacity: 0.3,
-});
-
-globalStyle(`${slideNextBtn}:active:not(:disabled) ${slideBtnCircle}`, {
- opacity: 0.5,
-});
-
-globalStyle(`${slideNextBtn}:disabled ${slideBtnCircle}`, {
- opacity: 0.04,
-});
+globalStyle(
+ `${slidePrevBtn} ${slideBtnCircle}, ${slideNextBtn} ${slideBtnCircle}`,
+ { opacity: 0.3 },
+);
+
+globalStyle(
+ `${slidePrevBtn}:active:not(:disabled) ${slideBtnCircle}, ${slideNextBtn}:active:not(:disabled) ${slideBtnCircle}`,
+ { opacity: 0.5 },
+);
+
+globalStyle(
+ `${slidePrevBtn}:disabled ${slideBtnCircle}, ${slideNextBtn}:disabled ${slideBtnCircle}`,
+ { opacity: 0.04 },
+);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const imgAreaBlurred = recipe({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -201,7 +201,10 @@ const GeneratedImgA = ({ | |
| className={styles.slidePrevBtn} | ||
| disabled={!swiper || currentSlideIndex === 0} | ||
| > | ||
| {currentSlideIndex === 0 ? <SlidePrevDisabled /> : <SlidePrev />} | ||
| <span className={styles.slideBtnCircle} aria-hidden /> | ||
| <span className={styles.slideBtnIcon} aria-hidden> | ||
| {currentSlideIndex === 0 ? <SlidePrevDisabled /> : <SlidePrev />} | ||
| </span> | ||
|
Comment on lines
+204
to
+207
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
Also applies to: 258-265 🤖 Prompt for AI Agents |
||
| </button> | ||
| {images.map((image, index) => { | ||
| const cachedDetection = | ||
|
|
@@ -252,11 +255,14 @@ const GeneratedImgA = ({ | |
| className={styles.slideNextBtn} | ||
| disabled={!swiper || currentSlideIndex === totalSlideCount - 1} | ||
| > | ||
| {currentSlideIndex === totalSlideCount - 1 ? ( | ||
| <SlideNextDisabled /> | ||
| ) : ( | ||
| <SlideNext /> | ||
| )} | ||
| <span className={styles.slideBtnCircle} aria-hidden /> | ||
| <span className={styles.slideBtnIcon} aria-hidden> | ||
| {currentSlideIndex === totalSlideCount - 1 ? ( | ||
| <SlideNextDisabled /> | ||
| ) : ( | ||
| <SlideNext /> | ||
| )} | ||
| </span> | ||
| </button> | ||
| </Swiper> | ||
| </div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,40 @@ type ProductPrefetchQueryKey = [ | |||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const RESULT_CARD_UI_FALLBACK = { | ||||||||||||||||||||||||||
| productName: '상품명 준비중', | ||||||||||||||||||||||||||
| mallName: '브랜드 준비중', | ||||||||||||||||||||||||||
| originalPrice: 0, | ||||||||||||||||||||||||||
| discountPrice: 0, | ||||||||||||||||||||||||||
| discountRate: 0, | ||||||||||||||||||||||||||
| colorHexes: ['#E7EBF0', '#D7DFE8', '#C3CFDD', '#AEBED0'], | ||||||||||||||||||||||||||
| saveCount: 0, | ||||||||||||||||||||||||||
| } as const; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const normalizeText = (value: unknown, fallback: string) => { | ||||||||||||||||||||||||||
| if (typeof value !== 'string') return fallback; | ||||||||||||||||||||||||||
| const normalized = value.trim(); | ||||||||||||||||||||||||||
| return normalized.length > 0 ? normalized : fallback; | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const toFiniteNumber = (value: unknown) => { | ||||||||||||||||||||||||||
| const numeric = Number(value); | ||||||||||||||||||||||||||
| return Number.isFinite(numeric) ? numeric : null; | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
Comment on lines
+57
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
현재 fallback 값이 모두 🛡️ null/undefined 모두 fallback으로 빠지도록 수정 제안 const toFiniteNumber = (value: unknown) => {
+ if (value === null || value === undefined) return null;
const numeric = Number(value);
return Number.isFinite(numeric) ? numeric : null;
};🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const normalizeColorHexes = (value: unknown) => { | ||||||||||||||||||||||||||
| if (!Array.isArray(value)) return [...RESULT_CARD_UI_FALLBACK.colorHexes]; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const normalized = value | ||||||||||||||||||||||||||
| .filter((hex): hex is string => typeof hex === 'string') | ||||||||||||||||||||||||||
| .map((hex) => hex.trim()) | ||||||||||||||||||||||||||
| .filter((hex) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)); | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return normalized.length > 0 | ||||||||||||||||||||||||||
| ? normalized | ||||||||||||||||||||||||||
| : [...RESULT_CARD_UI_FALLBACK.colorHexes]; | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| interface CurationSheetProps { | ||||||||||||||||||||||||||
| groupId?: number | null; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
@@ -96,37 +130,37 @@ export const CurationSheet = ({ groupId = null }: CurationSheetProps) => { | |||||||||||||||||||||||||
| ? byProductId | ||||||||||||||||||||||||||
| : index + 1; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const originalPrice = Number(product.furnitureProductOriginalPrice); | ||||||||||||||||||||||||||
| const discountPrice = Number(product.furnitureProductDiscountPrice); | ||||||||||||||||||||||||||
| const discountRate = Number(product.furnitureProductDiscountRate); | ||||||||||||||||||||||||||
| const saveCount = Number(product.furnitureProductSaveCount); | ||||||||||||||||||||||||||
| const originalPrice = toFiniteNumber(product.furnitureProductOriginalPrice); | ||||||||||||||||||||||||||
| const discountPrice = toFiniteNumber(product.furnitureProductDiscountPrice); | ||||||||||||||||||||||||||
| const discountRate = toFiniteNumber(product.furnitureProductDiscountRate); | ||||||||||||||||||||||||||
| const saveCount = toFiniteNumber(product.furnitureProductSaveCount); | ||||||||||||||||||||||||||
|
Comment on lines
+133
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prettier 포맷팅 위반 — 80자 초과. 정적 분석에서 133~134번 줄이 80자를 넘는다고 보고했어요. Prettier 규칙에 맞게 줄바꿈을 적용해 주세요. 🔧 포맷 수정 제안- const originalPrice = toFiniteNumber(product.furnitureProductOriginalPrice);
- const discountPrice = toFiniteNumber(product.furnitureProductDiscountPrice);
+ const originalPrice = toFiniteNumber(
+ product.furnitureProductOriginalPrice
+ );
+ const discountPrice = toFiniteNumber(
+ product.furnitureProductDiscountPrice
+ );As per coding guidelines, "Maintain a maximum line width of 80 characters". 📝 Committable suggestion
Suggested change
🧰 Tools🪛 ESLint[error] 133-133: Replace (prettier/prettier) [error] 134-134: Replace (prettier/prettier) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||
| id: recommendId, | ||||||||||||||||||||||||||
| isRecommendId: Boolean(recommendId), | ||||||||||||||||||||||||||
| furnitureProductId: safeProductId, | ||||||||||||||||||||||||||
| furnitureProductName: product.furnitureProductName, | ||||||||||||||||||||||||||
| furnitureProductMallName: product.furnitureProductMallName, | ||||||||||||||||||||||||||
| furnitureProductName: normalizeText( | ||||||||||||||||||||||||||
| product.furnitureProductName, | ||||||||||||||||||||||||||
| RESULT_CARD_UI_FALLBACK.productName | ||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||
| furnitureProductMallName: normalizeText( | ||||||||||||||||||||||||||
| product.furnitureProductMallName, | ||||||||||||||||||||||||||
| RESULT_CARD_UI_FALLBACK.mallName | ||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||
| furnitureProductImageUrl: | ||||||||||||||||||||||||||
| product.furnitureProductImageUrl || product.baseFurnitureImageUrl, | ||||||||||||||||||||||||||
| furnitureProductSiteUrl: product.furnitureProductSiteUrl, | ||||||||||||||||||||||||||
| furnitureProductOriginalPrice: Number.isFinite(originalPrice) | ||||||||||||||||||||||||||
| ? originalPrice | ||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||
| furnitureProductDiscountPrice: Number.isFinite(discountPrice) | ||||||||||||||||||||||||||
| ? discountPrice | ||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||
| furnitureProductDiscountRate: Number.isFinite(discountRate) | ||||||||||||||||||||||||||
| ? discountRate | ||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||
| furnitureProductColorHexes: Array.isArray( | ||||||||||||||||||||||||||
| furnitureProductOriginalPrice: | ||||||||||||||||||||||||||
| originalPrice ?? RESULT_CARD_UI_FALLBACK.originalPrice, | ||||||||||||||||||||||||||
| furnitureProductDiscountPrice: | ||||||||||||||||||||||||||
| discountPrice ?? RESULT_CARD_UI_FALLBACK.discountPrice, | ||||||||||||||||||||||||||
| furnitureProductDiscountRate: | ||||||||||||||||||||||||||
| discountRate ?? RESULT_CARD_UI_FALLBACK.discountRate, | ||||||||||||||||||||||||||
| furnitureProductColorHexes: normalizeColorHexes( | ||||||||||||||||||||||||||
| product.furnitureProductColorHexes | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
| ? product.furnitureProductColorHexes | ||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||
| furnitureProductSaveCount: Number.isFinite(saveCount) | ||||||||||||||||||||||||||
| ? saveCount | ||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||
| furnitureProductSaveCount: | ||||||||||||||||||||||||||
| saveCount ?? RESULT_CARD_UI_FALLBACK.saveCount, | ||||||||||||||||||||||||||
|
Comment on lines
+153
to
+163
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the API omits price/discount/saveCount fields, this mapping now replaces them with Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||
| }, [productsData]); | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
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.
🧹 Nitpick | 🔵 Trivial
주석 처리된 import를 제거해 주세요.
// import { zIndex } from '@/shared/styles/tokens/zIndex';— 사용하지 않는 주석 코드는 정리하는 게 좋습니다.🧹 제거 제안
-// import { zIndex } from '@/shared/styles/tokens/zIndex';📝 Committable suggestion
🤖 Prompt for AI Agents