updated ui and added NPED back

This commit is contained in:
2025-09-21 20:10:05 +01:00
parent 8f6fba1e63
commit 50cedaf2c4
11 changed files with 537 additions and 25 deletions

View File

@@ -1,9 +1,11 @@
import { useRef, useCallback, useEffect } from "react";
import { useQuery } from "@tanstack/react-query";
import { CAM_BASE } from "../utils/config";
const apiUrl = import.meta.env.VITE_LOCAL_BASE;
const apiUrl = CAM_BASE;
async function fetchSnapshot(cameraSide: string) {
console.log(`${apiUrl}/${cameraSide}-preview`);
const response = await fetch(`${apiUrl}/${cameraSide}-preview`);
if (!response.ok) {
throw new Error("Cannot reach endpoint");