Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 38s
Build & Deploy / 🧪 QA (push) Successful in 2m11s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m43s
Build & Deploy / 🏗️ Build (push) Failing after 13m14s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
26 lines
790 B
TypeScript
26 lines
790 B
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import dynamic from 'next/dynamic';
|
|
|
|
const LeafletMap = dynamic(() => import('@/components/LeafletMap'), {
|
|
ssr: false,
|
|
loading: () => (
|
|
<div className="h-full w-full bg-neutral-medium flex items-center justify-center">
|
|
<div className="animate-pulse text-primary font-medium">Loading Map...</div>
|
|
</div>
|
|
),
|
|
});
|
|
|
|
interface ContactMapProps {
|
|
address?: string;
|
|
lat?: number;
|
|
lng?: number;
|
|
locations?: Array<{name: string, address: string, lat: number, lng: number}>;
|
|
}
|
|
|
|
export default function ContactMap({ address, lat, lng, locations }: ContactMapProps) {
|
|
const mapLocations = locations || (address && lat && lng ? [{ name: 'E-TIB Gruppe', address, lat, lng }] : []);
|
|
return <LeafletMap locations={mapLocations} />;
|
|
}
|