code quality improvements and improved file error handling
This commit is contained in:
@@ -2,10 +2,11 @@ import { useRef, useCallback, useEffect } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
const apiUrl = import.meta.env.VITE_BASEURL;
|
||||
|
||||
const folkstoneUrl = import.meta.env.VITE_FOLKESTONE_BASE;
|
||||
async function fetchSnapshot(cameraSide: string) {
|
||||
console.log(`${folkstoneUrl}/${cameraSide}-preview`);
|
||||
const response = await fetch(
|
||||
// `http://100.116.253.81/Colour-preview`
|
||||
// `${folkstoneUrl}/Colour-preview`
|
||||
`${apiUrl}/${cameraSide}-preview`
|
||||
);
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user