refactored system settings

This commit is contained in:
2025-09-12 13:28:14 +01:00
parent d03f73f751
commit 7588326cbe
19 changed files with 363 additions and 232 deletions

View File

@@ -5,15 +5,8 @@ import { useOverviewOverlay } from "../../hooks/useOverviewOverlay";
import { useSightingFeedContext } from "../../context/SightingFeedContext";
import { useHiDPICanvas } from "../../hooks/useHiDPICanvas";
import NavigationArrow from "../UI/NavigationArrow";
// import { useSwipeable } from "react-swipeable";
// import { useNavigate } from "react-router";
const SightingOverview = () => {
// const navigate = useNavigate();
// const handlers = useSwipeable({
// onSwipedRight: () => navigate("/front-camera-settings"),
// trackMouse: true,
// });
const [overlayMode, setOverlayMode] = useState<0 | 1 | 2>(0);
const imgRef = useRef<HTMLImageElement | null>(null);
@@ -23,7 +16,7 @@ const SightingOverview = () => {
setOverlayMode((m) => ((m + 1) % 3) as 0 | 1 | 2);
}, []);
const { effectiveSelected, side, mostRecent } = useSightingFeedContext();
const { side, mostRecent } = useSightingFeedContext();
useOverviewOverlay(mostRecent, overlayMode, imgRef, canvasRef);
@@ -67,7 +60,7 @@ const SightingOverview = () => {
(click image to toggle)
</div>
</div>
<SightingWidgetDetails effectiveSelected={effectiveSelected} />
<SightingWidgetDetails effectiveSelected={mostRecent} />
</div>
);
};