import { Metadata } from "next"; import Link from "next/link"; import { getTranslations } from "next-intl/server"; import { ChevronRight, Droplets, ArrowRight } from "lucide-react"; import Header from "@/components/layout/Header"; import Footer from "@/components/layout/Footer"; import { isValidLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales"; type Params = Promise<{ locale: string }>; export async function generateMetadata({ params, }: { params: Params; }): Promise { const { locale } = await params; const validLocale = isValidLocale(locale) ? locale : DEFAULT_LOCALE; const t = await getTranslations({ locale: validLocale, namespace: "Solutions.Hub" }); const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://manoonoils.com"; const localePrefix = validLocale === DEFAULT_LOCALE ? "/sr" : `/${validLocale}`; const canonicalUrl = `${baseUrl}${localePrefix}/solutions`; return { title: t("metaTitle"), description: t("metaDescription"), alternates: { canonical: canonicalUrl, }, openGraph: { url: canonicalUrl, }, }; } interface CategoryCardProps { title: string; description: string; href: string; icon: React.ReactNode; priority?: boolean; } function CategoryCard({ title, description, href, icon, priority }: CategoryCardProps) { return (
{icon}

{title}

{priority && ( Popular )}

{description}

{priority ? "Explore Solutions" : "Learn More"}
); } interface QuickLinkProps { title: string; href: string; count?: number; } function QuickLink({ title, href, count }: QuickLinkProps) { return ( {title}
{count !== undefined && ( {count} solutions )}
); } export default async function SolutionsHubPage({ params, }: { params: Params; }) { const { locale } = await params; const t = await getTranslations({ locale, namespace: "Solutions" }); const hubT = await getTranslations({ locale, namespace: "Solutions.Hub" }); const categories = [ { title: hubT("categories.oilForConcern.title"), description: hubT("categories.oilForConcern.description"), href: `/${locale}/solutions/by-concern`, icon: , priority: true, }, ]; return ( <>

{hubT("title")}

{hubT("subtitle")}

{categories.map((category) => ( ))}

{hubT("quickAccess.byConcern")}

{hubT("quickAccess.byConcernDesc")}

{hubT("quickAccess.byOil")}

{hubT("quickAccess.byOilDesc")}

{hubT("cta.title")}

{hubT("cta.description")}

{hubT("cta.button")}