Files
salar-store/app/page.tsx
T
Alireza HassaniandCursor 49b83223f1 Wire homepage banners to Meshkee static-image slots.
Publish a slot catalog so the dashboard can import keys, and keep local placeholders when a slot is empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 17:54:10 +03:30

53 lines
1.9 KiB
TypeScript

import { AboutUs } from "@/components/AboutUs";
import { BannerGrid4, BannerRow3 } from "@/components/Banners";
import { BlogCarousel } from "@/components/BlogCarousel";
import { Brands } from "@/components/Brands";
import { Categories } from "@/components/Categories";
import { HeroSlider } from "@/components/HeroSlider";
import { SpecialSale } from "@/components/SpecialSale";
import { TopSelling } from "@/components/TopSelling";
import {
STATIC_IMAGE_KEYS,
firstImageForSlot,
getStaticImageSlots,
imagesForSlot,
slotByKey,
} from "@/lib/static-images";
export default async function Home() {
const slots = await getStaticImageSlots("home");
const sliderSlot = slotByKey(slots, STATIC_IMAGE_KEYS.slider);
const sideSlot = slotByKey(slots, STATIC_IMAGE_KEYS.bannersBelowSlider);
const fourSlot = slotByKey(slots, STATIC_IMAGE_KEYS.fourBannerSection);
const threeSlot = slotByKey(slots, STATIC_IMAGE_KEYS.threeBannerRow);
const aboutSlot = slotByKey(slots, STATIC_IMAGE_KEYS.aboutUsImage);
return (
<>
<HeroSlider
images={imagesForSlot(slots, STATIC_IMAGE_KEYS.slider)}
aspectRatio={sliderSlot?.aspectRatio}
sideImages={imagesForSlot(slots, STATIC_IMAGE_KEYS.bannersBelowSlider)}
sideAspectRatio={sideSlot?.aspectRatio}
/>
<SpecialSale />
<Categories images={imagesForSlot(slots, STATIC_IMAGE_KEYS.categories)} />
<BannerGrid4
images={imagesForSlot(slots, STATIC_IMAGE_KEYS.fourBannerSection)}
aspectRatio={fourSlot?.aspectRatio}
/>
<TopSelling />
<BannerRow3
images={imagesForSlot(slots, STATIC_IMAGE_KEYS.threeBannerRow)}
aspectRatio={threeSlot?.aspectRatio}
/>
<Brands />
<AboutUs
image={firstImageForSlot(slots, STATIC_IMAGE_KEYS.aboutUsImage)}
aspectRatio={aboutSlot?.aspectRatio}
/>
<BlogCarousel />
</>
);
}