first commit
This commit is contained in:
commit
b7b0f253ce
85 files changed
+7560
No files matched your search
@@ -0,0 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
import { useT } from "@/i18n/client";
|
||||
import type { MapViewProps } from "./map-view";
|
||||
|
||||
// Leaflet använder window och får därför inte renderas på servern.
|
||||
const MapView = dynamic(() => import("./map-view"), {
|
||||
ssr: false,
|
||||
loading: () => <MapLoading />,
|
||||
});
|
||||
|
||||
function MapLoading() {
|
||||
const t = useT();
|
||||
return <div className="text-secondary p-4">{t("common.loading")}</div>;
|
||||
}
|
||||
|
||||
export function MapLoader(props: MapViewProps) {
|
||||
return <MapView {...props} />;
|
||||
}
|
||||
Reference in new issue
Block a user