beherbergung/frontend/search/components/ngo/LeafletMapWithoutSSR.tsx

11 lines
350 B
TypeScript
Raw Normal View History

2022-03-10 15:19:50 +01:00
import dynamic from "next/dynamic"
/** The component uses Leaflet, which is using the `windows` object.
* This is not available with SSR (during development).
* Solution:
* https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr
**/
export const LeafletMapWithoutSSR = dynamic(() => import("./LeafletMap"), {
ssr: false
})