Files
doormile_react/src/components/map/ContactMapEmbed.tsx

23 lines
721 B
TypeScript

"use client";
/**
* ContactMapEmbed
* ---------------------------------------------------------------------------
* Client boundary that lazy-loads the Leaflet map. `ssr: false` keeps Leaflet
* out of the server bundle and off the critical render path. The host container
* already owns the fixed height, so the loading state stays invisible before
* the interactive map is ready.
*/
import dynamic from "next/dynamic";
import styles from "./OfficeMap.module.css";
const OfficeMap = dynamic(() => import("./OfficeMap"), {
ssr: false,
loading: () => <div className={styles.mapMountReserve} role="presentation" aria-hidden="true" />,
});
export default function ContactMapEmbed() {
return <OfficeMap />;
}