updated preview camera view and removed NPED alert disptach

This commit is contained in:
2025-09-19 10:55:36 +01:00
parent 9a56392876
commit 047251756e
4 changed files with 30 additions and 29 deletions

View File

@@ -43,18 +43,21 @@ const SightingModal = ({
Sighting Details
</h2>
</div>
<div className="flex flex-col md:flex-row gap-3 items-center mb-2">
<NumberPlate vrm={sighting?.vrm} motion={motionAway} />
<img
src={sighting?.plateUrlColour}
alt="plate patch"
className="h-16 object-contain rounded-md"
/>
<div className="flex flex-col md:flex-row gap-3 items-center mb-2 justify-between">
<div className="flex flex-col md:flex-row gap-3 items-center">
<NumberPlate vrm={sighting?.vrm} motion={motionAway} />
<img
src={sighting?.plateUrlColour}
alt="plate patch"
className="h-16 object-contain rounded-md"
/>
</div>
{isHotListHit && (
<img
src={HotListImg}
alt="hotlistHit"
className="h-18 object-contain rounded-md"
className="h-20 object-contain rounded-md"
/>
)}
</div>

View File

@@ -7,7 +7,7 @@ import CardHeader from "../UI/CardHeader";
import clsx from "clsx";
import { useSightingFeedContext } from "../../context/SightingFeedContext";
import SightingModal from "../SightingModal/SightingModal";
import { useAlertHitContext } from "../../context/AlertHitContext";
// import { useAlertHitContext } from "../../context/AlertHitContext";
import InfoBar from "./InfoBar";
function useNow(tickMs = 1000) {
@@ -44,7 +44,7 @@ export default function SightingHistoryWidget({
selectedSighting,
} = useSightingFeedContext();
const { dispatch } = useAlertHitContext();
// const { dispatch } = useAlertHitContext();
const hasAutoOpenedRef = useRef(false);
@@ -62,18 +62,18 @@ export default function SightingHistoryWidget({
[sightings]
);
useEffect(() => {
rows?.forEach((obj) => {
const isNPEDHit = obj?.metadata?.npedJSON?.status_code === 404;
// useEffect(() => {
// rows?.forEach((obj) => {
// const isNPEDHit = obj?.metadata?.npedJSON?.status_code === 404;
if (isNPEDHit) {
dispatch({
type: "ADD",
payload: obj,
});
}
});
}, [rows, dispatch]);
// if (isNPEDHit) {
// dispatch({
// type: "ADD",
// payload: obj,
// });
// }
// });
// }, [rows, dispatch]);
useEffect(() => {
if (hasAutoOpenedRef.current) return;