From af422ef15fbcb0e1ac967b628c155cee4e57f681 Mon Sep 17 00:00:00 2001 From: LMS10 Date: Sun, 8 Dec 2024 21:51:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=8B=A4=ED=8C=A8=20=EC=8B=9C=20=EA=B8=B0=EB=B3=B8?= =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=EB=A1=9C=20=EB=8C=80=EC=B2=B4?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ItemPage/components/ItemDetailsSection.jsx | 12 +++++++----- .../MarketPage/components/AllItemsSection.jsx | 15 ++++++++++----- .../MarketPage/components/BestItemsSection.jsx | 15 ++++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/pages/ItemPage/components/ItemDetailsSection.jsx b/src/pages/ItemPage/components/ItemDetailsSection.jsx index 83a5fe1ea..171539547 100644 --- a/src/pages/ItemPage/components/ItemDetailsSection.jsx +++ b/src/pages/ItemPage/components/ItemDetailsSection.jsx @@ -162,11 +162,13 @@ function ItemDetailsSection({ item }) { return ( - {item.images && item.images.length > 0 ? ( - - ) : ( - - )} + 0 ? item.images[0] : defaultImage + } + alt={item.name} + onError={(e) => (e.target.src = defaultImage)} + /> diff --git a/src/pages/MarketPage/components/AllItemsSection.jsx b/src/pages/MarketPage/components/AllItemsSection.jsx index 0c8722f3b..d894222b1 100644 --- a/src/pages/MarketPage/components/AllItemsSection.jsx +++ b/src/pages/MarketPage/components/AllItemsSection.jsx @@ -92,11 +92,16 @@ function AllItemsSection() {
{itemList?.map((item) => ( - {item.images && item.images.length > 0 ? ( - {item.name} - ) : ( - {item.name} - )} + 0 + ? item.images[0] + : defaultImage + } + alt={item.name} + className="itemImage" + onError={(e) => (e.target.src = defaultImage)} + />

{item.name}

{item.price.toLocaleString()}원

diff --git a/src/pages/MarketPage/components/BestItemsSection.jsx b/src/pages/MarketPage/components/BestItemsSection.jsx index 60765d6f4..d98d01d88 100644 --- a/src/pages/MarketPage/components/BestItemsSection.jsx +++ b/src/pages/MarketPage/components/BestItemsSection.jsx @@ -43,11 +43,16 @@ function BestItemsSection() {
{itemList?.map((item) => ( - {item.images && item.images.length > 0 ? ( - {item.name} - ) : ( - {item.name} - )} + 0 + ? item.images[0] + : defaultImage + } + alt={item.name} + className="itemImage" + onError={(e) => (e.target.src = defaultImage)} + />

{item.name}

{item.price.toLocaleString()}원