diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-31 09:03:22 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-01-31 09:03:22 +0700 |
| commit | b8764138241116e0c741a7786364f5630080720c (patch) | |
| tree | caf4396671469bc6ac992c9b741fe3f8701c986e /src-migrate/modules/product-detail/components/SimilarSide.tsx | |
| parent | 3f849355048e5c280a35a5747577e5296b90e9fd (diff) | |
| parent | 0550b0dbe9b8e369cfe211b78ab0de49a6e1f49d (diff) | |
Merge branch 'release' into feature/all-promotion
Diffstat (limited to 'src-migrate/modules/product-detail/components/SimilarSide.tsx')
| -rw-r--r-- | src-migrate/modules/product-detail/components/SimilarSide.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src-migrate/modules/product-detail/components/SimilarSide.tsx b/src-migrate/modules/product-detail/components/SimilarSide.tsx index 646a1c51..d70a314d 100644 --- a/src-migrate/modules/product-detail/components/SimilarSide.tsx +++ b/src-migrate/modules/product-detail/components/SimilarSide.tsx @@ -1,6 +1,4 @@ -import style from '../styles/side-similar.module.css' - -import React from 'react' +import { Skeleton } from '@chakra-ui/react' import ProductCard from '~/modules/product-card' import useProductSimilar from '~/modules/product-similar/hooks/useProductSimilar' @@ -19,7 +17,11 @@ const SimilarSide = ({ product }: Props) => { const products = productSimilar.data?.products || [] return ( - <div className={style['wrapper']}> + <Skeleton + isLoaded={!productSimilar.isLoading} + className="h-[500px] overflow-auto grid grid-cols-1 gap-y-4 divide-y divide-gray-300 border border-gray-300 rounded-lg" + rounded='lg' + > {products.map((product) => ( <ProductCard key={product.id} @@ -27,7 +29,7 @@ const SimilarSide = ({ product }: Props) => { layout='horizontal' /> ))} - </div> + </Skeleton> ) } |
