+
{besideImages.map((image, index) => (
))}
diff --git a/src/components/HeroSlider.tsx b/src/components/HeroSlider.tsx
index ec1df5f..d4b68e1 100644
--- a/src/components/HeroSlider.tsx
+++ b/src/components/HeroSlider.tsx
@@ -6,12 +6,11 @@ import type { StaticImage } from "@/lib/static-images";
type Props = {
images: StaticImage[];
- aspectRatio?: string | null;
fallback: SlotFallback;
- imageClassName: string;
+ className?: string;
};
-export function HeroSlider({ images, aspectRatio, fallback, imageClassName }: Props) {
+export function HeroSlider({ images, fallback, className = "" }: Props) {
const [index, setIndex] = useState(0);
const slides = images.length > 0 ? images : [undefined];
@@ -28,16 +27,14 @@ export function HeroSlider({ images, aspectRatio, fallback, imageClassName }: Pr
);
}
return (
-
+
{slides.map((image, slideIndex) => (
diff --git a/src/components/PromoBanners.tsx b/src/components/PromoBanners.tsx
index b3539c8..3d1761e 100644
--- a/src/components/PromoBanners.tsx
+++ b/src/components/PromoBanners.tsx
@@ -29,7 +29,7 @@ export function PromoBanners({ slot }: { slot?: StaticImageSlot }) {
const images = padSlotImages(slot, 2);
return (
-
+
{images.map((image, index) => {
const fallback = rowFallbacks[index] ?? rowFallbacks[1];
return (
@@ -37,8 +37,7 @@ export function PromoBanners({ slot }: { slot?: StaticImageSlot }) {
key={image?.id ?? `${fallback.src}-${index}`}
image={image}
fallback={fallback}
- aspectRatio={slot?.aspectRatio}
- imageClassName="h-48 w-full object-cover sm:h-56"
+ aspectRatio={slot?.aspectRatio ?? "569:264"}
/>
);
})}
@@ -61,8 +60,7 @@ export function DiscountBanner({ slot }: { slot?: StaticImageSlot }) {
width: 1168,
height: 264,
}}
- aspectRatio={slot?.aspectRatio}
- imageClassName="h-40 w-full object-cover sm:h-48"
+ aspectRatio={slot?.aspectRatio ?? "146:33"}
>
{(image.titleFa || image.titleEn || image.title || image.subtext) && (
@@ -92,8 +90,7 @@ export function DiscountBanner({ slot }: { slot?: StaticImageSlot }) {
width: 1168,
height: 264,
}}
- aspectRatio={slot?.aspectRatio}
- imageClassName="h-40 w-full object-cover sm:h-48"
+ aspectRatio={slot?.aspectRatio ?? "146:33"}
>
+

) : (
);
const href = image?.url ? image.linkUrl || undefined : fallback.href;
const wrapped = href ? (
image?.url ? (
-
+
{media}
) : (
-
+
{media}
)
@@ -62,7 +63,7 @@ export function SlotBanner({
return (
{wrapped}