From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 17 Feb 2023 17:07:50 +0700
Subject: Refactor

---
 src/lib/product/components/ProductSimilar.jsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/lib/product/components/ProductSimilar.jsx

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

diff --git a/src/lib/product/components/ProductSimilar.jsx b/src/lib/product/components/ProductSimilar.jsx
new file mode 100644
index 00000000..89cab536
--- /dev/null
+++ b/src/lib/product/components/ProductSimilar.jsx
@@ -0,0 +1,15 @@
+import PopularProductSkeleton from "@/lib/home/components/Skeleton/PopularProductSkeleton"
+import useProductSimilar from "../hooks/useProductSimilar"
+import ProductSlider from "./ProductSlider"
+
+const ProductSimilar = ({ query }) => {
+  const { productSimilar } = useProductSimilar({ query })
+
+  if (productSimilar.isLoading) {
+    return <PopularProductSkeleton />
+  }
+
+  return <ProductSlider products={productSimilar.data} />
+}
+
+export default ProductSimilar
\ No newline at end of file
-- 
cgit v1.2.3

