refactor(react/collections): reintroduce view mode

This commit is contained in:
Elian Doran
2025-09-03 23:57:38 +03:00
parent 330b17bff8
commit 620e6012da
5 changed files with 26 additions and 25 deletions

View File

@@ -3,11 +3,19 @@ import "./index.css";
import { ViewModeProps } from "../interface";
import { useNoteLabel } from "../../react/hooks";
import { DEFAULT_MAP_LAYER_NAME } from "./map_layer";
import { LatLng } from "leaflet";
const DEFAULT_COORDINATES: [number, number] = [3.878638227135724, 446.6630455551659];
const DEFAULT_ZOOM = 2;
export default function GeoView({ note }: ViewModeProps) {
interface MapData {
view?: {
center?: LatLng | [number, number];
zoom?: number;
};
}
export default function GeoView({ note, viewStorage }: ViewModeProps<MapData>) {
const [ layerName ] = useNoteLabel(note, "map:style");
return (