refactor: update camera settings route and improve error/loading messages in components by increasing swipe size

This commit is contained in:
2025-09-29 13:00:56 +01:00
parent 220ec2d376
commit 3b9469496b
8 changed files with 23 additions and 23 deletions

View File

@@ -10,10 +10,10 @@ export const SnapshotContainer = ({
side,
settingsPage,
}: SnapshotContainerProps) => {
const { canvasRef, isError, isPending } = useGetOverviewSnapshot(side);
const { canvasRef, isError, isPending } = useGetOverviewSnapshot();
if (isError) return <>An error occurred</>;
if (isPending) return <>Loading...</>;
if (isError) return <p className="h-100">An error occurred</p>;
if (isPending) return <p className="h-100">Loading...</p>;
const handleZoomClick = (event: React.MouseEvent<HTMLCanvasElement>) => {
const bounds = canvasRef.current?.getBoundingClientRect();

View File

@@ -9,7 +9,7 @@ const FrontCameraOverviewCard = () => {
useOverviewVideo();
const navigate = useNavigate();
const handlers = useSwipeable({
onSwipedRight: () => navigate("/front-camera-settings"),
onSwipedRight: () => navigate("/camera-settings"),
trackMouse: true,
});

View File

@@ -22,9 +22,10 @@ const SightingOverview = () => {
const { sync } = useHiDPICanvas(imgRef, canvasRef);
if (isLoading) return <p>Loading</p>;
if (isLoading) return <p className="h-100">Loading</p>;
if (isError) return <p>An error occurred, Cannot display footage</p>;
if (isError)
return <p className="h-100">An error occurred, Cannot display footage</p>;
return (
<div className="flex flex-col md:flex-row">