- refactored code around hotlist hits and sounds
- improved performace for sounds playing
This commit is contained in:
@@ -8,6 +8,7 @@ import { useAlertHitContext } from "../../context/AlertHitContext";
|
||||
import NPED_CAT_A from "/NPED_Cat_A.svg";
|
||||
import NPED_CAT_B from "/NPED_Cat_B.svg";
|
||||
import NPED_CAT_C from "/NPED_Cat_C.svg";
|
||||
import { checkIsHotListHit } from "../../utils/utils";
|
||||
|
||||
type AlertItemProps = {
|
||||
item: SightingType;
|
||||
@@ -19,9 +20,8 @@ const AlertItem = ({ item }: AlertItemProps) => {
|
||||
|
||||
// const {d} = useCameraBlackboard();
|
||||
const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY";
|
||||
// [34].metadata.hotlistMatches["MAV_Hotlist.csv"]
|
||||
//check if true is in any hotlist property
|
||||
const isHotListHit = item?.metadata?.hotlistMatches?.Hotlist0 === true;
|
||||
|
||||
const isHotListHit = checkIsHotListHit(item);
|
||||
const isNPEDHitA = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "A";
|
||||
const isNPEDHitB = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "B";
|
||||
const isNPEDHitC = item?.metadata?.npedJSON?.["NPED CATEGORY"] === "C";
|
||||
|
||||
Reference in New Issue
Block a user