diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..1fd2c7f --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +VITE_CAM_BASE= \ No newline at end of file diff --git a/index.html b/index.html index c50d2a6..dcab83b 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ MAV | In Car System -
+
diff --git a/public/NPED.svg b/public/NPED.svg new file mode 100644 index 0000000..a12fa9a --- /dev/null +++ b/public/NPED.svg @@ -0,0 +1,497 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/CameraSettings/CameraSettingFields.tsx b/src/components/CameraSettings/CameraSettingFields.tsx index c5e568b..a30fe34 100644 --- a/src/components/CameraSettings/CameraSettingFields.tsx +++ b/src/components/CameraSettings/CameraSettingFields.tsx @@ -130,7 +130,7 @@ const CameraSettingFields = ({ diff --git a/src/components/CameraSettings/CameraSettings.tsx b/src/components/CameraSettings/CameraSettings.tsx index 3fcfab7..9036679 100644 --- a/src/components/CameraSettings/CameraSettings.tsx +++ b/src/components/CameraSettings/CameraSettings.tsx @@ -13,21 +13,19 @@ const CameraSettings = ({ title, side }: { title: string; side: string }) => { updateCameraConfigError, } = useFetchCameraConfig(side); console.log(updateCameraConfigError); + console.log(isPending); + return ( - {isError && <>Cannot Fetch camera config} - - {isPending ? ( - <>Loading - ) : ( -
- - -
- )} + {isPending && <>Loading camera config} + {isError && <>Error fetching camera config} +
+ + +
); }; diff --git a/src/components/HistoryList/AlertItem.tsx b/src/components/HistoryList/AlertItem.tsx index e423cff..3bfb7b8 100644 --- a/src/components/HistoryList/AlertItem.tsx +++ b/src/components/HistoryList/AlertItem.tsx @@ -12,7 +12,7 @@ type AlertItemProps = { const AlertItem = ({ item }: AlertItemProps) => { const [isModalOpen, setIsModalOpen] = useState(false); const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY"; - // const isNPEDHit = item?.metadata?.npedJSON?.status_code === 404; + const isNPEDHit = item?.metadata?.npedJSON?.status_code === 404; const isHotListHit = item?.metadata?.hotlistMatches?.Hotlist0 === true; const handleClick = () => { @@ -36,6 +36,13 @@ const AlertItem = ({ item }: AlertItemProps) => { className="h-20 object-contain rounded-md" /> )} + {isNPEDHit && ( + hotlistHit + )}
MAKE: {item.make} MODEL: {item.model} diff --git a/src/components/SettingForms/NPED/NPEDCard.tsx b/src/components/SettingForms/NPED/NPEDCard.tsx index f7b76c8..0cbb585 100644 --- a/src/components/SettingForms/NPED/NPEDCard.tsx +++ b/src/components/SettingForms/NPED/NPEDCard.tsx @@ -1,11 +1,12 @@ import Card from "../../UI/Card"; import CardHeader from "../../UI/CardHeader"; import NPEDFields from "./NPEDFields"; +import NPEDIcon from "/NPED.svg"; const NPEDCard = () => { return ( - + ); diff --git a/src/components/SettingForms/SightingData/SightingDataFields.tsx b/src/components/SettingForms/SightingData/SightingDataFields.tsx index e2021e2..79c8c4c 100644 --- a/src/components/SettingForms/SightingData/SightingDataFields.tsx +++ b/src/components/SettingForms/SightingData/SightingDataFields.tsx @@ -26,6 +26,7 @@ const SightingDataFields = () => { @@ -38,6 +39,7 @@ const SightingDataFields = () => { @@ -60,6 +62,7 @@ const SightingDataFields = () => { @@ -70,6 +73,7 @@ const SightingDataFields = () => { @@ -80,6 +84,7 @@ const SightingDataFields = () => { @@ -90,6 +95,7 @@ const SightingDataFields = () => {