summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components/SimilarBottom.tsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-01-30 13:51:19 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-01-30 13:51:48 +0700
commit9c2b36fb15511b9f38492e133125a8b766c58a19 (patch)
treea31117cd908034c973be20b9816374cd195965de /src-migrate/modules/product-detail/components/SimilarBottom.tsx
parent76e3eec8db414307cea6b11e3ebb461aed8e1e26 (diff)
Update product similar section
Diffstat (limited to 'src-migrate/modules/product-detail/components/SimilarBottom.tsx')
-rw-r--r--src-migrate/modules/product-detail/components/SimilarBottom.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src-migrate/modules/product-detail/components/SimilarBottom.tsx b/src-migrate/modules/product-detail/components/SimilarBottom.tsx
index 9a12a6ef..40d4dd82 100644
--- a/src-migrate/modules/product-detail/components/SimilarBottom.tsx
+++ b/src-migrate/modules/product-detail/components/SimilarBottom.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import { Skeleton } from '@chakra-ui/react'
import useProductSimilar from '~/modules/product-similar/hooks/useProductSimilar'
import ProductSlider from '~/modules/product-slider'
import { IProductDetail } from '~/types/product'
@@ -15,7 +15,15 @@ const SimilarBottom = ({ product }: Props) => {
const products = productSimilar.data?.products || []
- return <ProductSlider products={products} productLayout='vertical' />;
+ return (
+ <Skeleton
+ isLoaded={!productSimilar.isLoading}
+ rounded='lg'
+ className='h-[350px]'
+ >
+ <ProductSlider products={products} productLayout='vertical' />
+ </Skeleton>
+ );
}
export default SimilarBottom \ No newline at end of file