From 1fa6f72233f57fffff2b0f73716b5c9401a7f308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B5=ED=9D=AC=20=EA=B9=80?= Date: Fri, 6 Dec 2024 03:58:51 +0900 Subject: [PATCH] =?UTF-8?q?=ED=99=88=20=EC=97=85=EB=A1=9C=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(user)/shops/page.jsx | 4 ++-- src/components/_main/home/featured/index.jsx | 1 - src/components/_main/home/shop/index.jsx | 17 ++++++++--------- src/components/forms/product.jsx | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/app/(user)/shops/page.jsx b/src/app/(user)/shops/page.jsx index 8e66320..5824e0e 100644 --- a/src/app/(user)/shops/page.jsx +++ b/src/app/(user)/shops/page.jsx @@ -22,12 +22,12 @@ export default async function ShopComponent() { }} > - + {/* All Shops Lorem Ipsum Is Simply Dummy Text Of The Printing And Typesetting Industry. - + */} diff --git a/src/components/_main/home/featured/index.jsx b/src/components/_main/home/featured/index.jsx index 987cef2..5ee437b 100644 --- a/src/components/_main/home/featured/index.jsx +++ b/src/components/_main/home/featured/index.jsx @@ -15,7 +15,6 @@ import { IoIosArrowForward } from 'react-icons/io'; import { lang } from 'src/components/lang/kr'; export default function Index() { const { data, isLoading } = useQuery(['featured-products'], () => api.getFeaturedProducts()); - return ( shops); return ( @@ -49,13 +50,11 @@ export default function ShopComponent() { - {(isLoading ? Array.from(new Array(6)) : shops)?.map((inner) => ( - - - - - - ))} + + {/* */} + + + {!isLoading && !Boolean(shops?.length) && ( Shop not found diff --git a/src/components/forms/product.jsx b/src/components/forms/product.jsx index 2efb106..c61f625 100644 --- a/src/components/forms/product.jsx +++ b/src/components/forms/product.jsx @@ -119,7 +119,7 @@ export default function ProductForm({ subCategory: currentProduct?.subCategory || (categories.length && categories[0].subCategories[0]?._id) || '', status: currentProduct?.status || STATUS_OPTIONS[0], blob: currentProduct?.blob || [], - isFeatured: currentProduct?.isFeatured || false, + isFeatured: currentProduct?.isFeatured || true, sku: currentProduct?.sku || '', price: currentProduct?.price || '', priceSale: currentProduct?.priceSale || '',