|
|
@@ -4,6 +4,7 @@ import { Swiper, SwiperSlide } from "swiper/react";
|
|
|
import { OpenAddToCartModalButton } from "@/components/common/AddToCartModal/OpenAddToCartModalButton";
|
|
|
import type {HomeProduct,HomeSectionImage} from "@/types/home/type"
|
|
|
import Link from "next/link";
|
|
|
+import Image from "next/image";
|
|
|
interface zeroWearProps {
|
|
|
zeroWear: HomeProduct[];
|
|
|
zeroWearImage:HomeSectionImage[]
|
|
|
@@ -176,12 +177,19 @@ const MiddleImageSwiper = ({ zeroWear,zeroWearImage }: zeroWearProps) => {
|
|
|
{productList.map((item) => (
|
|
|
<SwiperSlide key={item.id}>
|
|
|
<div className="bg-white rounded overflow-hidden flex flex-col">
|
|
|
- <img
|
|
|
+ {/* <img
|
|
|
src={item.image_url}
|
|
|
alt={item.name}
|
|
|
className="w-full aspect-[3/4] object-cover"
|
|
|
- />
|
|
|
-
|
|
|
+ /> */}
|
|
|
+ <Link href={`/${item.urlKey}.html`} className="relative aspect-[3/4] w-full overflow-hidden rounded-sm block">
|
|
|
+ <Image
|
|
|
+ src={item.image_url}
|
|
|
+ alt={item.name}
|
|
|
+ fill
|
|
|
+ className="object-cover"
|
|
|
+ />
|
|
|
+ </Link>
|
|
|
<div className="p-2 flex flex-col gap-2">
|
|
|
<Link href={`/${item.urlKey}.html`} className="text-sm text-gray-800 truncate">
|
|
|
{item.name}
|