46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
import Hero from "@/components/homes/home-15/Hero";
|
|
import SwiperItems from "@/components/homes/home-15/SwiperItems";
|
|
import CategoryItems from "@/components/homes/home-15/CategoryItems";
|
|
import React from "react";
|
|
import { getSiteSettings } from "@/utils/siteSettings";
|
|
|
|
export const revalidate = Number(process.env.JSITE_REVALIDATE_SECONDS) || 3600;
|
|
|
|
export async function generateMetadata() {
|
|
const siteUrl = process.env.SITE_URL;
|
|
const data = await getSiteSettings(siteUrl);
|
|
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">
|
|
<Hero />
|
|
</section>
|
|
<section className="w-full xl:w-10/12 xl:mx-auto overflow-x-hidden">
|
|
<SwiperItems />
|
|
</section>
|
|
</>
|
|
</div>{" "}
|
|
</>
|
|
);
|
|
}
|