Files
Mav-Mobile-UI/src/components/FrontCameraOverview/FrontCameraOverviewCard.tsx

44 lines
1.3 KiB
TypeScript
Raw Normal View History

2025-08-13 14:23:48 +01:00
import clsx from "clsx";
import Card from "../UI/Card";
import CardHeader from "../UI/CardHeader";
import { faCamera } from "@fortawesome/free-regular-svg-icons";
2025-08-13 14:23:48 +01:00
import { useSwipeable } from "react-swipeable";
import { useNavigate } from "react-router";
import { useOverviewVideo } from "../../hooks/useOverviewVideo";
2025-08-20 08:27:05 +01:00
import SightingOverview from "../SightingOverview/SightingOverview";
import { useSightingFeedContext } from "../../context/SightingFeedContext";
2025-08-13 14:23:48 +01:00
2025-08-20 08:27:05 +01:00
type CardProps = React.HTMLAttributes<HTMLDivElement>;
const FrontCameraOverviewCard = ({ className }: CardProps) => {
2025-08-13 14:23:48 +01:00
useOverviewVideo();
const navigate = useNavigate();
const handlers = useSwipeable({
onSwipedRight: () => navigate("/front-camera-settings"),
2025-08-13 14:23:48 +01:00
trackMouse: true,
});
const { mostRecent } = useSightingFeedContext();
2025-08-13 14:23:48 +01:00
return (
2025-08-20 08:27:05 +01:00
<Card
className={clsx(
"relative min-h-[40vh] md:min-h-[60vh] h-auto",
className
)}
>
2025-08-13 14:23:48 +01:00
<div className="flex flex-col space-y-3 h-full" {...handlers}>
<CardHeader
title="Front Overview"
icon={faCamera}
sighting={mostRecent}
/>
2025-08-20 08:27:05 +01:00
<SightingOverview />
{/* <SnapshotContainer side="TargetDetectionFront" /> */}
2025-08-13 14:23:48 +01:00
</div>
</Card>
);
};
export default FrontCameraOverviewCard;