updated image loading
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user