diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 39c19db00..445d6d626 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -7,6 +7,7 @@ import Image, { ImageProps } from 'next/image' import WishlistButton from '@components/wishlist/WishlistButton' import usePrice from '@framework/product/use-price' import ProductTag from '../ProductTag' + interface Props { className?: string product: Product @@ -53,6 +54,7 @@ const ProductCard: FC = ({ height={320} width={320} layout="fixed" + objectFit="cover" {...imgProps} /> )} diff --git a/pages/index.tsx b/pages/index.tsx index 24956a869..1c9d0cb8b 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -38,27 +38,33 @@ export async function getStaticProps({ } export default function Home({ - products, categories + products, + categories, }: InferGetStaticPropsType) { return ( <> -
- {categories.slice(0, 3).map((category: any, i: number) => ( - - - - - - ))} +
+ {categories.slice(0, 3).map((category: any, i: number) => ( + + + + + + ))}
{products.slice(0, 3).map((product: any, i: number) => (