import ContactForm from '@/components/ContactForm';
import JsonLd from '@/components/JsonLd';
import Reveal from '@/components/Reveal';
import { Container, Heading, Section } from '@/components/ui';
import { Metadata } from 'next';
import { getTranslations } from 'next-intl/server';
import { SITE_URL } from '@/lib/schema';
import { getOGImageMetadata } from '@/lib/metadata';
import { Suspense } from 'react';
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' });
const title = t('meta.title') || t('title');
const description = t('meta.description') || t('subtitle');
return {
title,
description,
alternates: {
canonical: `${SITE_URL}/${locale}/contact`,
languages: {
'de-DE': '/de/contact',
'en-US': '/en/contact',
},
},
openGraph: {
title: `${title} | KLZ Cables`,
description,
url: `${SITE_URL}/${locale}/contact`,
siteName: 'KLZ Cables',
images: getOGImageMetadata('contact', title, locale),
locale: `${locale.toUpperCase()}_DE`,
type: 'website',
},
twitter: {
card: 'summary_large_image',
title: `${title} | KLZ Cables`,
description,
images: [`${SITE_URL}/${locale}/contact/opengraph-image`],
},
robots: {
index: true,
follow: true,
},
};
}
export async function generateStaticParams() {
return [{ locale: 'de' }, { locale: 'en' }];
}
export default async function ContactPage({ params }: ContactPageProps) {
const { locale } = params;
const t = await getTranslations({ locale, namespace: 'Contact' });
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 */}
);
}