Files
Mav-Mobile-UI/src/components/FrontCameraSettings/OverviewVideoContainer.tsx

34 lines
824 B
TypeScript
Raw Normal View History

2025-08-13 14:23:48 +01:00
import clsx from "clsx";
import { SnapshotContainer } from "../CameraOverview/SnapshotContainer";
import Card from "../UI/Card";
import { useNavigate } from "react-router";
import { useSwipeable } from "react-swipeable";
2025-08-13 14:23:48 +01:00
const OverviewVideoContainer = ({
side,
2025-08-18 12:53:30 +01:00
settingsPage,
2025-08-13 14:23:48 +01:00
}: {
title: string;
side: string;
2025-08-18 12:53:30 +01:00
settingsPage?: boolean;
2025-08-13 14:23:48 +01:00
}) => {
const navigate = useNavigate();
const handlers = useSwipeable({
onSwipedLeft: () => navigate("/"),
trackMouse: true,
});
2025-08-13 14:23:48 +01:00
return (
<Card
className={clsx(
"relative min-h-[40vh] md:min-h-[60vh] max-h-[80vh] lg:w-[70%] overflow-y-hidden"
)}
>
<div className="w-full" {...handlers}>
2025-08-18 12:53:30 +01:00
<SnapshotContainer side={side} settingsPage={settingsPage} />
2025-08-13 14:23:48 +01:00
</div>
</Card>
);
};
export default OverviewVideoContainer;