From 4c9028f58bcb720ee66a52b86942426b805c87aa Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 15 Jun 2026 00:19:56 +0200 Subject: [PATCH] feat(map): separate standorte and project map variants --- app/[locale]/[slug]/page.tsx | 3 +-- app/[locale]/referenzen/page.tsx | 3 +-- app/[locale]/standorte/page.tsx | 15 +++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/[locale]/[slug]/page.tsx b/app/[locale]/[slug]/page.tsx index 4bf7930e3..6d54b0a6c 100644 --- a/app/[locale]/[slug]/page.tsx +++ b/app/[locale]/[slug]/page.tsx @@ -10,7 +10,6 @@ import TrackedLink from '@/components/analytics/TrackedLink'; import { getButtonClasses, ButtonOverlay } from '@/components/ui/Button'; import { getAllReferences } from '@/lib/references'; import { defaultLocations, minorLocations } from '@/lib/map-data'; -import { standorteLocations } from '@/lib/standorte-data'; // Import components used in MDX import { HeroVideo as HomeHero } from '@/components/blocks/HeroVideo'; import { SubCompanyTiles as HomeSubCompanyTiles } from '@/components/blocks/SubCompanyTiles'; @@ -153,7 +152,7 @@ export default async function Page(props: { params: Promise<{ locale: string; sl // Fetch references to enrich the map if it's used const references = await getAllReferences(locale); - const allLocations = [...standorteLocations, ...defaultLocations, ...minorLocations]; + const allLocations = [...defaultLocations, ...minorLocations]; const enrichedLocations = allLocations.map(loc => { if (loc.type === 'project') { const ref = references.find(r => r.slug === loc.id); diff --git a/app/[locale]/referenzen/page.tsx b/app/[locale]/referenzen/page.tsx index 90d249daa..61daf29c5 100644 --- a/app/[locale]/referenzen/page.tsx +++ b/app/[locale]/referenzen/page.tsx @@ -9,7 +9,6 @@ import { SITE_URL } from '@/lib/schema'; import Image from 'next/image'; import { InteractiveGermanyMap } from '@/components/blocks/InteractiveGermanyMap'; import { defaultLocations, minorLocations } from '@/lib/map-data'; -import { standorteLocations } from '@/lib/standorte-data'; interface PageProps { params: Promise<{ @@ -53,7 +52,7 @@ export default async function ReferenzenOverview(props: { params: Promise<{ loca const references = await getAllReferences(locale); - const allLocations = [...standorteLocations, ...defaultLocations, ...minorLocations]; + const allLocations = [...defaultLocations, ...minorLocations]; const enrichedLocations = allLocations.map(loc => { if (loc.type === 'project') { const ref = references.find(r => r.slug === loc.id); diff --git a/app/[locale]/standorte/page.tsx b/app/[locale]/standorte/page.tsx index f96908b20..c1791d755 100644 --- a/app/[locale]/standorte/page.tsx +++ b/app/[locale]/standorte/page.tsx @@ -6,7 +6,7 @@ import { MapPin, Navigation, ArrowUpRight } from 'lucide-react'; import { getButtonClasses, ButtonOverlay } from '@/components/ui/Button'; import { SITE_URL } from '@/lib/schema'; import Image from 'next/image'; -import { standorteData } from '@/lib/standorte-data'; +import { standorteData, standorteLocations } from '@/lib/standorte-data'; import { InteractiveGermanyMap } from '@/components/blocks/InteractiveGermanyMap'; interface PageProps { @@ -15,17 +15,15 @@ interface PageProps { }>; } -export async function generateMetadata({ params }: PageProps): Promise { +export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params; - if (locale !== 'de' && locale !== 'en') return {}; + const safeLocale = locale === 'de' ? 'de' : 'en'; return { - title: locale === 'de' ? 'Standorte | E-TIB Gruppe' : 'Locations | E-TIB Group', - description: locale === 'de' - ? 'Die operativen Standorte der E-TIB Gruppe: Guben, Kirchheilingen und Bülstedt.' - : 'The operational locations of the E-TIB Group: Guben, Kirchheilingen and Bülstedt.', + title: safeLocale === 'en' ? 'Our Locations' : 'Unsere Standorte', + description: safeLocale === 'en' ? 'Our operational locations across Germany.' : 'Unsere operativen Standorte deutschlandweit.', alternates: { - canonical: `${SITE_URL}/${locale}/standorte`, + canonical: `${SITE_URL}/${safeLocale}/standorte`, languages: { de: `${SITE_URL}/de/standorte`, en: `${SITE_URL}/en/standorte`, @@ -46,6 +44,7 @@ export default async function StandorteOverview(props: { params: Promise<{ local {/* Map Hero Section */}