From a9351196df063c4bd995bcb2347c101b8135c1a0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 21 Dec 2025 01:03:57 -0500 Subject: [PATCH] update frontend --- src/components/Map/MapControls.jsx | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/components/Map/MapControls.jsx 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 ( +
+ + + +
+ ); +}