removed console.logs

This commit is contained in:
2025-10-07 15:58:16 +01:00
parent 50d22def56
commit 992fb4f959
5 changed files with 7 additions and 11 deletions

View File

@@ -17,7 +17,7 @@ const CameraSettings = ({
}) => { }) => {
const { data, updateCameraConfig, updateCameraConfigError } = const { data, updateCameraConfig, updateCameraConfigError } =
useFetchCameraConfig(side); useFetchCameraConfig(side);
console.log(updateCameraConfigError);
return ( return (
<Card className="overflow-hidden min-h-[40vh] md:min-h-[60vh] max-h-[80vh] lg:w-[40%] p-4"> <Card className="overflow-hidden min-h-[40vh] md:min-h-[60vh] max-h-[80vh] lg:w-[40%] p-4">
<div className="relative flex flex-col space-y-3"> <div className="relative flex flex-col space-y-3">

View File

@@ -15,7 +15,7 @@ type AlertItemProps = {
const AlertItem = ({ item }: AlertItemProps) => { const AlertItem = ({ item }: AlertItemProps) => {
const [isModalOpen, setIsModalOpen] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false);
const { dispatch, isError } = useAlertHitContext(); const { dispatch } = useAlertHitContext();
// const {d} = useCameraBlackboard(); // const {d} = useCameraBlackboard();
const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY"; const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY";
@@ -24,7 +24,6 @@ const AlertItem = ({ item }: AlertItemProps) => {
const isNPEDHitB = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "B"; const isNPEDHitB = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "B";
const isNPEDHitC = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "C"; const isNPEDHitC = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "C";
console.log(isError);
const handleClick = () => { const handleClick = () => {
setIsModalOpen(true); setIsModalOpen(true);
}; };

View File

@@ -51,7 +51,7 @@ const SightingModal = ({
dispatch({ type: "ADD", payload: sighting }); dispatch({ type: "ADD", payload: sighting });
handleClose(); handleClose();
} catch (error) { } catch (error) {
console.log(error); console.error(error);
toast.error("Failed to add sighting to alert list"); toast.error("Failed to add sighting to alert list");
handleClose(); handleClose();
} }

View File

@@ -9,12 +9,12 @@ export const useGetConfigs = () => {
const response = await fetch(`${apiUrl}/api/config-ids`); const response = await fetch(`${apiUrl}/api/config-ids`);
if (!response.ok) { if (!response.ok) {
console.log("failed fetching"); throw new Error("Cannot get configs");
} }
const data = await response.json(); const data = await response.json();
setConfigs(data); setConfigs(data);
} catch (error) { } catch (error) {
console.log(error); console.error(error);
} }
} }
getConfigs(); getConfigs();

View File

@@ -1,14 +1,11 @@
import FrontCameraOverviewCard from "../components/FrontCameraOverview/FrontCameraOverviewCard"; import FrontCameraOverviewCard from "../components/FrontCameraOverview/FrontCameraOverviewCard";
import SightingHistoryWidget from "../components/SightingsWidget/SightingWidget"; import SightingHistoryWidget from "../components/SightingsWidget/SightingWidget";
import { SightingFeedProvider } from "../context/providers/SightingFeedProvider"; import { SightingFeedProvider } from "../context/providers/SightingFeedProvider";
import { CAM_BASE, OUTSIDE_CAM_BASE } from "../utils/config"; import { CAM_BASE } from "../utils/config";
const Dashboard = () => { const Dashboard = () => {
const mode = import.meta.env.MODE;
const base_url = `${CAM_BASE}/SightingList/sightingSummary?mostRecentRef=`; const base_url = `${CAM_BASE}/SightingList/sightingSummary?mostRecentRef=`;
// const outside_url = `http://100.82.205.44/mergedHistory/sightingSummary?mostRecentRef=`;
console.log(mode);
console.log(OUTSIDE_CAM_BASE);
return ( return (
<SightingFeedProvider url={base_url}> <SightingFeedProvider url={base_url}>
<div className="mx-auto flex flex-col lg:flex-row gap-2 px-1 sm:px-2 lg:px-0 w-full min-h-screen"> <div className="mx-auto flex flex-col lg:flex-row gap-2 px-1 sm:px-2 lg:px-0 w-full min-h-screen">