MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / handleStyleToggle

Function handleStyleToggle

src/components/MapToolbar.tsx:40–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 const [currentStyle, setCurrentStyle] = useState<MapStyle>(defaultStyle);
39
40 const handleStyleToggle = () => {
41 const next: MapStyle = currentStyle === "dark" ? "satellite" : "dark";
42 setCurrentStyle(next);
43 onStyleChange?.(next);
44 };
45
46 const items = [
47 { icon: Layers, onClick: onToggleLayers ?? (() => {}), label: showFields ? "Hide Regions" : "Show Regions", active: showFields },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected