diff --git a/apps/client/src/widgets/note_map/NoteMap.tsx b/apps/client/src/widgets/note_map/NoteMap.tsx index ce062be20..c9f73f6b9 100644 --- a/apps/client/src/widgets/note_map/NoteMap.tsx +++ b/apps/client/src/widgets/note_map/NoteMap.tsx @@ -67,21 +67,8 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) { return (
- setMapType("link")} - frame - /> - - setMapType("tree")} - frame - /> + +
@@ -90,6 +77,23 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) { ) } +function MapTypeSwitcher({ icon, text, type, currentMapType, setMapType }: { + icon: string; + text: string; + type: MapType; + currentMapType: MapType; + setMapType: (type: MapType) => void; +}) { + return ( + setMapType(type)} + frame + /> + ) +} + function getCssData(container: HTMLElement, styleResolver: HTMLElement): CssData { const containerStyle = window.getComputedStyle(container); const styleResolverStyle = window.getComputedStyle(styleResolver);