updated image loading

This commit is contained in:
2025-08-22 10:38:28 +01:00
parent 44af1b21b7
commit 5ededd8e05
15 changed files with 258 additions and 120 deletions

View File

@@ -4,6 +4,7 @@ import { useQuery } from "@tanstack/react-query";
const apiUrl = import.meta.env.VITE_BASEURL;
async function fetchSnapshot(cameraSide: string) {
console.log(`${apiUrl}/${cameraSide}-preview`);
const response = await fetch(
// `http://100.116.253.81/Colour-preview`
`${apiUrl}/${cameraSide}-preview`
@@ -40,7 +41,7 @@ export function useGetOverviewSnapshot(cameraSide: string) {
queryKey: ["overviewSnapshot", cameraSide],
queryFn: () => fetchSnapshot(cameraSide),
refetchOnWindowFocus: false,
refetchInterval: 1000,
// refetchInterval: 1000,
});
useEffect(() => {