import Header from "@/components/landing-page/headers"; import AboutSection from "@/components/landing-page/about"; import ProductSection from "@/components/landing-page/product"; import ServiceSection from "@/components/landing-page/service"; import Technology from "@/components/landing-page/technology"; import Footer from "@/components/landing-page/footer"; import PopupNewsBanner from "@/components/landing-page/popup-news"; import { publicFetch } from "@/lib/public-api"; import type { CmsAboutContent, CmsHeroContent, CmsPartnerContent, CmsPopupContent, CmsProductContent, CmsServiceContent, } from "@/types/cms-landing"; export default async function Home() { const [hero, aboutList, productList, serviceList, partners, popupList] = await Promise.all([ publicFetch("/hero-contents"), publicFetch("/about-us-contents"), publicFetch("/our-product-contents"), publicFetch("/our-service-contents"), publicFetch("/partner-contents"), publicFetch("/popup-news-contents?page=1&limit=20"), ]); const about = aboutList?.[0] ?? null; const products = Array.isArray(productList) ? productList : productList ? [productList] : []; const services = Array.isArray(serviceList) ? serviceList : serviceList ? [serviceList] : []; const popups = Array.isArray(popupList) ? popupList : []; return (
); }