mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
refactor(react/collections): move layer name to view
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
import Map from "./map";
|
||||
import "./index.css";
|
||||
import { ViewModeProps } from "../interface";
|
||||
import { useNoteLabel } from "../../react/hooks";
|
||||
import { DEFAULT_MAP_LAYER_NAME } from "./map_layer";
|
||||
|
||||
const DEFAULT_COORDINATES: [number, number] = [3.878638227135724, 446.6630455551659];
|
||||
const DEFAULT_ZOOM = 2;
|
||||
|
||||
export default function GeoView() {
|
||||
export default function GeoView({ note }: ViewModeProps) {
|
||||
const [ layerName ] = useNoteLabel(note, "map:style");
|
||||
|
||||
return (
|
||||
<div className="geo-view">
|
||||
<Map
|
||||
coordinates={DEFAULT_COORDINATES}
|
||||
zoom={DEFAULT_ZOOM}
|
||||
layerName={layerName ?? DEFAULT_MAP_LAYER_NAME}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user