Connect the storefront to the Meshkee Website API.

Products, blog, search, mega menu, and home carousels now read live tenant data, and login goes to the customer portal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-18 11:22:31 +03:30
co-authored by Cursor
parent 1a2b62463e
commit c0a95a826a
34 changed files with 2458 additions and 401 deletions
+49 -40
View File
@@ -5,49 +5,58 @@ import { Contact } from "@/components/Contact";
import { Faq } from "@/components/Faq";
import { FeaturedCategories } from "@/components/FeaturedCategories";
import { Features } from "@/components/Features";
import { Footer } from "@/components/Footer";
import { Header } from "@/components/Header";
import { Hero } from "@/components/Hero";
import { ProductCarousel } from "@/components/ProductCarousel";
import { TopHeader } from "@/components/TopHeader";
import { saleProducts, topProducts, yeganehProducts } from "@/data/content";
import { SiteChrome } from "@/components/SiteChrome";
import { getSpecialProducts, listBlogs } from "@/lib/api";
import { getHomeStaticImageSlots, HOME_SLOT_KEYS, slotByKey } from "@/lib/static-images";
export default async function Home() {
const [slots, sale, top, own, blogs] = await Promise.all([
getHomeStaticImageSlots(),
getSpecialProducts("special-sale"),
getSpecialProducts("top-selling", "پرفروش"),
getSpecialProducts("nini-naderi-products", "نینی"),
listBlogs({ pageSize: 8 }),
]);
export default function Home() {
return (
<div className="flex min-h-full flex-col">
<TopHeader />
<Header />
<main className="flex-1">
<Hero />
<FeaturedCategories />
<Features />
<ProductCarousel
id="sale"
english="Special Sale"
title="فروش ویژه نینی‌ها"
products={saleProducts}
countdown
leadBanner
/>
<DualBanners />
<ProductCarousel
english="Top Selling"
title="پرفروش‌ترین‌ها"
products={topProducts}
/>
<TripleBanners />
<ProductCarousel
id="yeganeh"
english="Yeganeh"
title="محصولات برند یگانه"
products={yeganehProducts}
/>
<About />
<BlogCarousel />
<Faq />
<Contact />
</main>
<Footer />
</div>
<SiteChrome>
<Hero
slider={slotByKey(slots, HOME_SLOT_KEYS.slider)}
beside={slotByKey(slots, HOME_SLOT_KEYS.besideSlider)}
/>
<FeaturedCategories slot={slotByKey(slots, HOME_SLOT_KEYS.categories)} />
<Features />
<ProductCarousel
id="sale"
english="Special Sale"
title={sale.title || "فروش ویژه نینی‌ها"}
products={sale.products}
countdown
leadBanner
bannerSlot={slotByKey(slots, HOME_SLOT_KEYS.specialSale)}
href="/special-sale"
/>
<DualBanners slot={slotByKey(slots, HOME_SLOT_KEYS.twoBannerRow)} />
<ProductCarousel
english="Top Selling"
title={top.title || "پرفروش‌ترین‌ها"}
products={top.products}
href="/products"
/>
<TripleBanners slot={slotByKey(slots, HOME_SLOT_KEYS.threeBannerRow)} />
<ProductCarousel
id="nini-naderi"
english="Nini Naderi"
title={own.title || "محصولات نینی نادری"}
products={own.products}
href="/products"
/>
<About slot={slotByKey(slots, HOME_SLOT_KEYS.aboutUs)} />
<BlogCarousel posts={blogs.items} />
<Faq />
<Contact />
</SiteChrome>
);
}