Skip to content

Commit

Permalink
[fix]: 상품이 하나일 경우 캐러셀을 띄우지 않고 단일 상품 렌더링하도록 수정(#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkyoung2 committed May 24, 2024
1 parent b5b8c55 commit 6369ad7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/layouts/Product/DetailMain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ const DetailMain = ({ productDescription }: DetailMainProps) => {
} = productDescription;
return (
<section className={styles.area_main}>
<ProductCarousel
thumbnails={productThumbnails}
className={styles.carousel}
/>
{productThumbnails.length > 1 && (
<ProductCarousel
thumbnails={productThumbnails}
className={styles.carousel}
/>
)}
{productThumbnails.length === 1 && (
<img
src={productThumbnails[0]}
alt={`${productName}상품이미지`}
className={styles.carousel}
/>
)}
<section className={styles.wrapper_info}>
<section className={styles.desc_prod}>
<div className={styles.title}>{productName}</div>
Expand Down

0 comments on commit 6369ad7

Please sign in to comment.