Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(react/collections/geomap): fix color class
Elian Doran3e2b777c3046
diff --git a/apps/client/src/widgets/collections/geomap/index.tsx b/apps/client/src/widgets/collections/geomap/index.tsxindex 8dc272604b..1426906910 100644--- a/apps/client/src/widgets/collections/geomap/index.tsx+++ b/apps/client/src/widgets/collections/geomap/index.tsx@@ -53,9 +53,13 @@ export default function GeoView({ note, noteIds, viewConfig, saveConfig }: ViewMfunction NoteMarker({ note }: { note: FNote }) {const [ location ] = useNoteLabel(note, LOCATION_ATTRIBUTE);- const [ colorClass ] = useNoteLabel(note, "colorClass");- useNoteLabel(note, "iconClass"); // React to icon changes.++ // React to changes+ useNoteLabel(note, "color");+ useNoteLabel(note, "iconClass");+const title = useNoteProperty(note, "title");+ const colorClass = note.getColorClass();const iconClass = note.getIcon();const latLng = location?.split(",", 2).map((el) => parseFloat(el)) as [ number, number ] | undefined;const icon = useMemo(() => buildIcon(iconClass, colorClass ?? undefined, title, note.noteId), [ iconClass, colorClass, title, note.noteId]);