import ContactForm from '@/components/ContactForm';
import JsonLd from '@/components/JsonLd';
import { Container, Heading, Section } from '@/components/ui';
import { Metadata } from 'next';
import { useTranslations } from 'next-intl';
import { getTranslations } from 'next-intl/server';
import dynamic from 'next/dynamic';
const LeafletMap = dynamic(() => import('@/components/LeafletMap'), {
ssr: false,
loading: () => (
),
});
interface ContactPageProps {
params: {
locale: string;
};
}
export async function generateMetadata({ params: { locale } }: ContactPageProps): Promise {
const t = await getTranslations({ locale, namespace: 'Contact' });
return {
title: t('title'),
description: t('subtitle'),
alternates: {
canonical: `/${locale}/contact`,
languages: {
'de': '/de/contact',
'en': '/en/contact',
'x-default': '/en/contact',
},
},
openGraph: {
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
url: `https://klz-cables.com/${locale}/contact`,
},
twitter: {
card: 'summary_large_image',
title: `${t('title')} | KLZ Cables`,
description: t('subtitle'),
},
};
}
export default function ContactPage() {
const t = useTranslations('Contact');
const locale = t('locale') || 'en'; // Fallback if needed, but usually passed via params
return (
{/* Hero Section */}
{t('title')}
{t('subtitle')}
{/* Contact Info */}
{t('info.howToReachUs')}
{t('info.office')}
{t('info.address')}
{t('hours.title')}
-
{t('hours.weekdays')}
{t('hours.weekdaysTime')}
-
{t('hours.weekend')}
{t('hours.closed')}
{/* Contact Form */}
{/* Map Section */}
);
}