diff --git a/src/components/Map/MapControls.jsx b/src/components/Map/MapControls.jsx new file mode 100644 index 0000000..4b7ba31 --- /dev/null +++ b/src/components/Map/MapControls.jsx @@ -0,0 +1,40 @@ +import React from "react"; +import "../../styles/mapControls.css"; + +function getCurrentTheme() { + if (typeof window === "undefined") return "blue"; + + try { + const saved = window.localStorage.getItem("sociowire:theme"); + if (saved === "dark" || saved === "blue" || saved === "light") { + return saved; + } + } catch { + // tant pis + } + return "blue"; +} + +export default function MapControls({ onMySpot, onPostWire }) { + const theme = getCurrentTheme(); + + return ( +
+ + + +
+ ); +}