Wire Meshkee catalog: products, blog, mega menu, and product search.
Catalog-only (no cart); search targets store items and products pages. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
cfa21cbee9
commit
8e14748b48
+33
-2
@@ -4,25 +4,38 @@ import { BlogCarousel } from "@/components/home/BlogCarousel";
|
||||
import { Branches } from "@/components/home/Branches";
|
||||
import { CategoryShowcase } from "@/components/home/CategoryShowcase";
|
||||
import { Hero } from "@/components/home/Hero";
|
||||
import { ProductCarousel } from "@/components/home/ProductCarousel";
|
||||
import { Services } from "@/components/home/Services";
|
||||
import { Stats } from "@/components/home/Stats";
|
||||
import { WideBanner } from "@/components/home/WideBanner";
|
||||
import {
|
||||
about,
|
||||
bannersBelowSlider,
|
||||
blogPosts,
|
||||
branches,
|
||||
consumablesFallback,
|
||||
refrigeratorPartsFallback,
|
||||
services,
|
||||
showcaseCategories,
|
||||
slides,
|
||||
threeBannerRow,
|
||||
twoBannerRow,
|
||||
washingMachinePartsFallback,
|
||||
} from "@/lib/data";
|
||||
import { fetchBlogs } from "@/lib/blog";
|
||||
import { fetchSpecialProducts } from "@/lib/store";
|
||||
import { fetchStaticImageSlots, overlaySlotImages, pickSlot } from "@/lib/static-images";
|
||||
|
||||
export const revalidate = 60;
|
||||
|
||||
export default async function HomePage() {
|
||||
const slots = await fetchStaticImageSlots("home");
|
||||
const [slots, consumables, refrigerator, washing, blogs] = await Promise.all([
|
||||
fetchStaticImageSlots("home"),
|
||||
fetchSpecialProducts("consumeables"),
|
||||
fetchSpecialProducts("refrigrator-parts"),
|
||||
fetchSpecialProducts("washing-machine-parts"),
|
||||
fetchBlogs({ pageSize: 8 }),
|
||||
]);
|
||||
|
||||
const slider = overlaySlotImages(
|
||||
pickSlot(slots, "slider"),
|
||||
@@ -122,11 +135,29 @@ export default async function HomePage() {
|
||||
<>
|
||||
<Hero slides={slider.items} aspectRatio={slider.aspectRatio} />
|
||||
<Services items={icons.items} />
|
||||
<ProductCarousel
|
||||
id="consumables"
|
||||
title={consumables.special?.title || "اقلام مصرفی"}
|
||||
subtitle="قطعات مصرفی پرفروش برای تعمیرگاه و مصرفکننده"
|
||||
products={consumables.products.length ? consumables.products : consumablesFallback}
|
||||
/>
|
||||
<ProductCarousel
|
||||
id="refrigerator-parts"
|
||||
title={refrigerator.special?.title || "قطعات یخچال"}
|
||||
subtitle="قطعات یخچال و فریزر"
|
||||
products={refrigerator.products.length ? refrigerator.products : refrigeratorPartsFallback}
|
||||
/>
|
||||
<ProductCarousel
|
||||
id="washing-machine-parts"
|
||||
title={washing.special?.title || "قطعات ماشین لباسشویی"}
|
||||
subtitle="قطعات لباسشویی خانگی و صنعتی"
|
||||
products={washing.products.length ? washing.products : washingMachinePartsFallback}
|
||||
/>
|
||||
<CategoryShowcase items={categories.items} aspectRatio={categories.aspectRatio} />
|
||||
<AboutPreview image={aboutImage.items[0]} aspectRatio={aboutImage.aspectRatio} />
|
||||
<BannerRow banners={fiveBanners.items.slice(0, 2)} columns={2} aspectRatio={fiveBanners.aspectRatio} />
|
||||
<BannerRow banners={fiveBanners.items.slice(2, 5)} columns={3} aspectRatio={fiveBanners.aspectRatio} />
|
||||
<BlogCarousel />
|
||||
<BlogCarousel posts={blogs.items} fallback={blogPosts} />
|
||||
<BannerRow banners={twoBanners.items} columns={2} aspectRatio={twoBanners.aspectRatio} />
|
||||
<Stats />
|
||||
<WideBanner image={fullRow.items[0]} aspectRatio={fullRow.aspectRatio} />
|
||||
|
||||
Reference in New Issue
Block a user