added forms and refactored component names

This commit is contained in:
2025-08-15 09:32:33 +01:00
parent 92e3617335
commit d537a32e2c
20 changed files with 640 additions and 309 deletions

View File

@@ -1,7 +1,5 @@
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useGetOverviewSnapshot } from "../../hooks/useGetOverviewSnapshot";
import { useNavigate } from "react-router";
import NavigationArrow from "../UI/NavigationArrow";
type SnapshotContainerProps = {
side: string;
@@ -9,24 +7,11 @@ type SnapshotContainerProps = {
export const SnapshotContainer = ({ side }: SnapshotContainerProps) => {
const { canvasRef } = useGetOverviewSnapshot(side);
const navigate = useNavigate();
return (
<div className="relative w-full aspect-video">
{side === "CameraFront" || side === "Rear" ? (
<FontAwesomeIcon
icon={faArrowLeft}
className="absolute top-[50%] left-[2%] backdrop-blur-md hover:cursor-pointer"
onClick={() => navigate("/front-camera-settings")}
/>
) : (
<FontAwesomeIcon
icon={faArrowRight}
className="absolute top-[50%] right-[2%] backdrop-blur-md"
/>
)}
<canvas ref={canvasRef} className="w-full h-full object-contain block" />
<NavigationArrow side={side} />
<canvas ref={canvasRef} className="w-full h-full object-contain block " />
</div>
);
};