import { generateOrganizationSchema, generateWebsiteSchema, } from "@/lib/schema"; import type { Metadata } from "next"; import { Suspense } from "react"; import { SkeletonLoader } from "./components/reuseableUI/skeletonLoader"; import { BundleProducts } from "./components/showroom/bundleProducts"; import { CategoryGridServer } from "./components/showroom/categoryGridServer"; import { BrandsSwiperServer } from "./components/showroom/brandsSwiperServer"; import { OffersSwiper } from "./components/showroom/offersSwiper"; import { ProductGrid } from "./components/showroom/productGrid"; import { ShowroomHeroCarousel } from "./components/showroom/showroomHeroCarousel"; import { TestimonialsGrid } from "./components/showroom/testimonialsGrid"; import { getStoreName } from "./utils/branding"; import dynamic from "next/dynamic"; import { FeaturesStrip } from "./components/showroom/featuresStrip"; import { LazyInstallationSection, LazyIndustriesSection, } from "./components/showroom/lazySections"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000"; const storeName = getStoreName(); const ogImageUrl = `${baseUrl.replace(/\/$/, "")}/og-image.png`; export const metadata: Metadata = { title: storeName, description: "Discover featured products, best sellers, and exclusive offers.", alternates: { canonical: baseUrl.replace(/\/$/, ""), }, openGraph: { title: storeName, description: "Discover featured products, best sellers, and exclusive offers.", type: "website", url: baseUrl.replace(/\/$/, ""), siteName: storeName, images: [ { url: ogImageUrl, width: 1200, height: 630, alt: `${storeName} - Storefront`, }, ], }, twitter: { card: "summary_large_image", title: storeName, description: "Discover featured products, best sellers, and exclusive offers.", images: [ogImageUrl], }, }; // Revalidate every 1 hour (3600 seconds) export const revalidate = 3600; const Promotions = dynamic( () => import("./components/showroom/promotion").then((mod) => ({ default: mod.Promotions, })), { loading: () => (
), } ); export default function Home() { const siteUrl = baseUrl.replace(/\/$/, ""); const organizationSchema = generateOrganizationSchema( storeName, siteUrl, "/logo.png", [] ); const websiteSchema = generateWebsiteSchema(storeName, siteUrl, "/search"); return ( <> {/* Schema.org structured data */}