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

@@ -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;