From f1d9a308f61e67f4c896608e73ac8413f61fa8af Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 11 Oct 2023 10:22:11 +0700
Subject: Add breadcrumb on detail product, search, brand, category page

---
 src/lib/product/components/Product/Product.jsx | 38 ++++++++++----------------
 1 file changed, 15 insertions(+), 23 deletions(-)

(limited to 'src/lib/product/components/Product/Product.jsx')

diff --git a/src/lib/product/components/Product/Product.jsx b/src/lib/product/components/Product/Product.jsx
index 54490c26..6e983c2e 100644
--- a/src/lib/product/components/Product/Product.jsx
+++ b/src/lib/product/components/Product/Product.jsx
@@ -36,29 +36,21 @@ const Product = ({ product, isVariant = false }) => {
     }
   }, [product, isVariant])
 
-  if (isVariant == true) {
-    return (
-      <>
-        <ProductDesktopVariant
-          product={product}
-          wishlist={wishlist}
-          toggleWishlist={toggleWishlist}
-        />
-        <ProductMobileVariant
-          product={product}
-          wishlist={wishlist}
-          toggleWishlist={toggleWishlist}
-        />
-      </>
-    )
-  } else {
-    return (
-      <>
-        <ProductMobile product={product} wishlist={wishlist} toggleWishlist={toggleWishlist} />
-        <ProductDesktop products={product} wishlist={wishlist} toggleWishlist={toggleWishlist} />
-      </>
-    )
-  }
+  return isVariant == true ? (
+    <>
+      <ProductDesktopVariant
+        product={product}
+        wishlist={wishlist}
+        toggleWishlist={toggleWishlist}
+      />
+      <ProductMobileVariant product={product} wishlist={wishlist} toggleWishlist={toggleWishlist} />
+    </>
+  ) : (
+    <>
+      <ProductMobile product={product} wishlist={wishlist} toggleWishlist={toggleWishlist} />
+      <ProductDesktop products={product} wishlist={wishlist} toggleWishlist={toggleWishlist} />
+    </>
+  )
 }
 
 export default Product
-- 
cgit v1.2.3

