t10015/app/page.jsx

54 lines
1.6 KiB
JavaScript

import Hero15 from "@/components/homes/home-15/Hero15";
import Features from "@/components/homes/home-15/Features";
import CategoryItems from "@/components/homes/home-15/CategoryItems";
import SwiperItems from "@/components/homes/home-15/SwiperItems";
import React from "react";
import { getSiteSettings } from "@/utils/data";
// Using a static value to comply with Next.js 15 build requirements.
// On-demand revalidation will be handled via the API route.
export const revalidate = 3600;
export async function generateMetadata() {
const data = await getSiteSettings();
const siteTitle = data.site_title || "";
const siteDescription = data.site_description || "";
const siteName = data.site_name || "";
const siteNameInPageTitles = data.site_name_in_page_titles || "None";
let title = siteTitle;
if (siteName && siteTitle) {
if (siteNameInPageTitles === "After") {
title = `${siteTitle} - ${siteName}`;
} else if (siteNameInPageTitles === "Before") {
title = `${siteName} - ${siteTitle}`;
}
}
return {
title,
description: siteDescription,
};
}
export default function Page() {
return (
<>
<div className="">
<>
<section className="wrapper">
<Hero15 />
</section>
<section className="container py-[4.5rem] xl:!py-24 lg:!py-24 md:!py-24">
<Features />
</section>
<section className="container pb-[4.5rem]">
<CategoryItems />
</section>
<section className="w-full xl:w-10/12 xl:mx-auto overflow-x-hidden">
<SwiperItems />
</section>
</>
</div>{" "}
</>
);
}