diff options
| author | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-08 09:14:28 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-08 09:14:28 +0700 |
| commit | 5678b10ef5100665a891e53177a7896f7d9cd9ca (patch) | |
| tree | 0213841842f7df928f72f7d9be2b2ed05edf3b29 | |
| parent | 43b2ce4d59c153655eb9b7a2190b83050fd48855 (diff) | |
| parent | 3ea1f49b036bfa352106142866f454bde2c61e02 (diff) | |
(andri) fix
4 files changed, 25 insertions, 12 deletions
diff --git a/public/robots.txt b/public/robots.txt index fc22ba6d..da5d58ad 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -14,8 +14,6 @@ Disallow: /shop/cart Disallow: /shop/checkout Disallow: /my/* Disallow: /shop/search/* -Disallow: /_next/static -Disallow: /api/* User-agent: Adsbot-Google Allow: /my/* @@ -23,6 +21,6 @@ Allow: /shop/search/* Sitemap: https://indoteknik.com/sitemap/products.xml -Sitemap: https://indoteknik.com/sitemap/brands.xml +Sitemap: https://indoteknik.com/sitemap/brands.xml Sitemap: https://indoteknik.com/sitemap/categories.xml -Sitemap: https://indoteknik.com/sitemap/videos.xml
\ No newline at end of file +Sitemap: https://indoteknik.com/sitemap/videos.xml diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx index 3beb75b4..9cd205e8 100644 --- a/src-migrate/modules/product-detail/components/ProductDetail.tsx +++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx @@ -402,8 +402,13 @@ const ProductDetail = ({ product }: Props) => { <div className='md:w-8/12 px-4 md:pl-6'> {!hasPrice && ( <div className='bg-red-50 p-2 py-1.5 rounded-lg border border-red-500 flex gap-1 items-center '> - <AlertTriangle size={18} className='text-red-600 shrink-0 mx-2' /> - <h1 className='text-red-600 font-normal text-h-sm'>Maaf untuk saat ini Produk yang anda cari tidak tersedia</h1> + <AlertTriangle + size={18} + className='text-red-600 shrink-0 mx-2' + /> + <div className='text-red-600 font-normal text-h-sm p-2'> + Maaf untuk saat ini Produk yang anda cari tidak tersedia + </div> </div> )} <div className='h-6 md:h-0' /> diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx index 6b4ab1e1..1584dc92 100644 --- a/src/lib/product/components/Product/ProductDesktopVariant.jsx +++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx @@ -314,6 +314,11 @@ const ProductDesktopVariant = ({ fetchData(); }, [product]); + const getImageVariant = (img) => { + if (!img || img.trim() === '') return '/images/noimage.jpeg'; + return `${img}?variant=True`; + }; + return ( <DesktopView> <div className='relative'> @@ -332,8 +337,8 @@ const ProductDesktopVariant = ({ <div className='w-full flex flex-wrap'> <div className='w-5/12'> <Image - src={product.image + '?variant=True'} - alt={product.name} + src={getImageVariant(product?.image)} + alt={product?.name} className='w-full h-[350px]' /> </div> @@ -345,9 +350,9 @@ const ProductDesktopVariant = ({ size={18} className='text-red-600 shrink-0 mx-2' /> - <h1 className='text-red-600 font-normal text-h-sm'> + <div className='text-red-600 font-normal text-h-lg p-2'> Maaf untuk saat ini Produk yang anda cari tidak tersedia - </h1> + </div> </div> )} <h1 className='text-title-md leading-10 font-medium'> diff --git a/src/lib/product/components/Product/ProductMobileVariant.jsx b/src/lib/product/components/Product/ProductMobileVariant.jsx index 0f4953df..9d375deb 100644 --- a/src/lib/product/components/Product/ProductMobileVariant.jsx +++ b/src/lib/product/components/Product/ProductMobileVariant.jsx @@ -181,6 +181,11 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { return Math.floor(Math.random() * 100) + 1; }); + const getImageVariant = (img) => { + if (!img || img.trim() === '') return '/images/noimage.jpeg'; + return `${img}?variant=True`; + }; + return ( <MobileView> <div className='relative'> @@ -338,7 +343,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { </div> <Image - src={product.image + '?variant=True'} + src={getImageVariant(product?.image)} alt={product.name} className='h-72 object-contain object-center w-full border-b border-gray_r-4' /> @@ -532,7 +537,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { <div className='flex mt-4'> <div className='w-[15%]'> <Image - src={product.image + '?variant=True'} + src={getImageVariant(product?.image)} alt={product.name} className='h-20 object-contain object-center w-full border border-gray_r-4' /> |
