diff --git a/src/app/page.tsx b/src/app/page.tsx index 2f69b9b..8ee47cb 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -46,13 +46,14 @@ export default async function Home() { (slot) => slot.key === STATIC_IMAGE_KEYS.threeBannerRow, ); const heroImages = imagesForSlot(staticImageSlots, STATIC_IMAGE_KEYS.homeHero); + const featuredCategoryImages = imagesForSlot(staticImageSlots, STATIC_IMAGE_KEYS.featuredCategories); return ( <> - + +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + {label} +
+ {label && ( + + {label} + + )} + + ); + return image.linkUrl ? {content} : content; +} + +export function FeaturedCategories({ + categories, + images = [], +}: { + categories: Category[]; + images?: StaticImageWithUrl[]; +}) { return (
@@ -18,7 +42,29 @@ export function FeaturedCategories({ categories }: { categories: Category[] }) { enTitle="Featured Categories" action="همه دسته‌ها" /> - {categories.length === 0 ? ( + {images.length > 0 ? ( + + {images.map((image, i) => ( + +
+ +
+
+ ))} +
+ ) : categories.length === 0 ? ( ) : ( {