import Reveal from '@/components/Reveal'; import Scribble from '@/components/Scribble'; import { Badge, Button, Card, Container, Section } from '@/components/ui'; import { useTranslations } from 'next-intl'; import { getTranslations } from 'next-intl/server'; import { Metadata } from 'next'; import Image from 'next/image'; import Link from 'next/link'; interface ProductsPageProps { params: { locale: string; }; } export async function generateMetadata({ params: { locale } }: ProductsPageProps): Promise { const t = await getTranslations({ locale, namespace: 'Products' }); return { title: t('title'), description: t('subtitle'), alternates: { canonical: `/${locale}/products`, languages: { 'de': '/de/products', 'en': '/en/products', 'x-default': '/en/products', }, }, openGraph: { title: `${t('title')} | KLZ Cables`, description: t('subtitle'), url: `https://klz-cables.com/${locale}/products`, }, twitter: { card: 'summary_large_image', title: `${t('title')} | KLZ Cables`, description: t('subtitle'), }, }; } export default function ProductsPage({ params }: ProductsPageProps) { const t = useTranslations('Products'); const categories = [ { title: t('categories.lowVoltage.title'), desc: t('categories.lowVoltage.description'), img: '/uploads/2024/11/low-voltage-category.webp', icon: '/uploads/2024/11/Low-Voltage.svg', href: `/${params.locale}/products/low-voltage-cables` }, { title: t('categories.mediumVoltage.title'), desc: t('categories.mediumVoltage.description'), img: '/uploads/2024/11/medium-voltage-category.webp', icon: '/uploads/2024/11/Medium-Voltage.svg', href: `/${params.locale}/products/medium-voltage-cables` }, { title: t('categories.highVoltage.title'), desc: t('categories.highVoltage.description'), img: '/uploads/2024/11/high-voltage-category.webp', icon: '/uploads/2024/11/High-Voltage.svg', href: `/${params.locale}/products/high-voltage-cables` }, { title: t('categories.solar.title'), desc: t('categories.solar.description'), img: '/uploads/2024/11/solar-category.webp', icon: '/uploads/2024/11/Solar.svg', href: `/${params.locale}/products/solar-cables` } ]; return (
{/* Hero Section */}
{t('heroSubtitle')}

{t.rich('title', { green: (chunks) => ( {chunks} ) })}

{t('subtitle')}

{categories.map((category, idx) => (
{category.title}
{t('categoryLabel')}

{category.title}

{category.desc}

{t('viewProducts')}
))}
{/* Technical Support CTA */}

{t('cta.title')}

{t('cta.description')}

); }