diff options
Diffstat (limited to 'src-migrate/modules/product-promo')
| -rw-r--r-- | src-migrate/modules/product-promo/components/Section.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src-migrate/modules/product-promo/components/Section.tsx b/src-migrate/modules/product-promo/components/Section.tsx index 04cf1363..b6753be7 100644 --- a/src-migrate/modules/product-promo/components/Section.tsx +++ b/src-migrate/modules/product-promo/components/Section.tsx @@ -8,6 +8,7 @@ import ProductPromoCard from './Card' import { IPromotion } from '~/types/promotion' import ProductPromoModal from "./Modal" import { useModalStore } from "../stores/useModalStore" +import clsxm from "~/libs/clsxm" type Props = { productId: number @@ -36,7 +37,13 @@ const ProductPromoSection = ({ productId }: Props) => { </div> )} - <Skeleton isLoaded={promotionsQuery.isSuccess} className="flex gap-x-4 overflow-x-auto min-h-[340px] px-4 md:px-0"> + <Skeleton + isLoaded={promotionsQuery.isSuccess} + className={clsxm( + "flex gap-x-4 overflow-x-auto px-4 md:px-0", { + "min-h-[340px]": promotions?.data && promotions?.data.length > 0 + })} + > {promotions?.data.map((promotion) => ( <div key={promotion.id} className="min-w-[400px] max-w-[400px]"> <ProductPromoCard promotion={promotion} /> |
