diff --git a/src/components/CameraSettings/CameraSettings.tsx b/src/components/CameraSettings/CameraSettings.tsx index 2a0a68e..7f371c9 100644 --- a/src/components/CameraSettings/CameraSettings.tsx +++ b/src/components/CameraSettings/CameraSettings.tsx @@ -17,7 +17,7 @@ const CameraSettings = ({ }) => { const { data, updateCameraConfig, updateCameraConfigError } = useFetchCameraConfig(side); - console.log(updateCameraConfigError); + return (
diff --git a/src/components/HistoryList/AlertItem.tsx b/src/components/HistoryList/AlertItem.tsx index 89838a2..ccdcb26 100644 --- a/src/components/HistoryList/AlertItem.tsx +++ b/src/components/HistoryList/AlertItem.tsx @@ -15,7 +15,7 @@ type AlertItemProps = { const AlertItem = ({ item }: AlertItemProps) => { const [isModalOpen, setIsModalOpen] = useState(false); - const { dispatch, isError } = useAlertHitContext(); + const { dispatch } = useAlertHitContext(); // const {d} = useCameraBlackboard(); const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY"; @@ -24,7 +24,6 @@ const AlertItem = ({ item }: AlertItemProps) => { const isNPEDHitB = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "B"; const isNPEDHitC = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "C"; - console.log(isError); const handleClick = () => { setIsModalOpen(true); }; diff --git a/src/components/SightingModal/SightingModal.tsx b/src/components/SightingModal/SightingModal.tsx index 71a3bef..ad2b65e 100644 --- a/src/components/SightingModal/SightingModal.tsx +++ b/src/components/SightingModal/SightingModal.tsx @@ -51,7 +51,7 @@ const SightingModal = ({ dispatch({ type: "ADD", payload: sighting }); handleClose(); } catch (error) { - console.log(error); + console.error(error); toast.error("Failed to add sighting to alert list"); handleClose(); } diff --git a/src/hooks/useGetConfigs.ts b/src/hooks/useGetConfigs.ts index 909db71..2e45744 100644 --- a/src/hooks/useGetConfigs.ts +++ b/src/hooks/useGetConfigs.ts @@ -9,12 +9,12 @@ export const useGetConfigs = () => { const response = await fetch(`${apiUrl}/api/config-ids`); if (!response.ok) { - console.log("failed fetching"); + throw new Error("Cannot get configs"); } const data = await response.json(); setConfigs(data); } catch (error) { - console.log(error); + console.error(error); } } getConfigs(); diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 2a94a9f..9654dd0 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -1,14 +1,11 @@ import FrontCameraOverviewCard from "../components/FrontCameraOverview/FrontCameraOverviewCard"; import SightingHistoryWidget from "../components/SightingsWidget/SightingWidget"; import { SightingFeedProvider } from "../context/providers/SightingFeedProvider"; -import { CAM_BASE, OUTSIDE_CAM_BASE } from "../utils/config"; +import { CAM_BASE } from "../utils/config"; const Dashboard = () => { - const mode = import.meta.env.MODE; 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 (