mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
refactor(react/collections): reintroduce view mode
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user