Minor fixes:
removed clock added navigation arrow to main sighting screen added zoom functionality to rear (camera B) settings brought back navigation to rear cam page
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import clsx from "clsx";
|
||||
import { SnapshotContainer } from "../CameraOverview/SnapshotContainer";
|
||||
import Card from "../UI/Card";
|
||||
import { useNavigate } from "react-router";
|
||||
import { useNavigate, useLocation } from "react-router";
|
||||
import { useSwipeable } from "react-swipeable";
|
||||
import type { ZoomLevel } from "../../types/types";
|
||||
|
||||
@@ -18,8 +18,17 @@ const OverviewVideoContainer = ({
|
||||
onZoomLevelChange?: (level: ZoomLevel) => void;
|
||||
}) => {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
console.log(location);
|
||||
const handlers = useSwipeable({
|
||||
onSwipedLeft: () => navigate("/"),
|
||||
onSwipedLeft: () => {
|
||||
if (location.pathname === "/rear-camera-settings") return;
|
||||
navigate("/");
|
||||
},
|
||||
onSwipedRight: () => {
|
||||
if (location.pathname === "/camera-settings") return;
|
||||
navigate("/");
|
||||
},
|
||||
trackMouse: true,
|
||||
});
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user