added Hotlist flag ad tag
This commit is contained in:
@@ -9,6 +9,7 @@ import { useSightingFeedContext } from "../../context/SightingFeedContext";
|
||||
import SightingModal from "../SightingModal/SightingModal";
|
||||
// import { useAlertHitContext } from "../../context/AlertHitContext";
|
||||
import InfoBar from "./InfoBar";
|
||||
import HotListImg from "/Hotlist_Hit.svg";
|
||||
|
||||
function useNow(tickMs = 1000) {
|
||||
const [, setNow] = useState(() => Date.now());
|
||||
@@ -102,37 +103,19 @@ export default function SightingHistoryWidget({
|
||||
const motionAway = (obj?.motion ?? "").toUpperCase() === "AWAY";
|
||||
const primaryIsColour = obj?.srcCam === 1;
|
||||
const secondaryMissing = (obj?.vrmSecondary ?? "") === "";
|
||||
|
||||
const isHotListHit =
|
||||
obj?.metadata?.hotlistMatches?.Hotlist0 === true;
|
||||
return (
|
||||
<div
|
||||
key={idx}
|
||||
className={`border border-neutral-700 rounded-md mb-2 p-2 cursor-pointer`}
|
||||
onClick={() => onRowClick(obj)}
|
||||
>
|
||||
{/* Info bar */}
|
||||
<InfoBar obj={obj} />
|
||||
|
||||
{/* Patch row */}
|
||||
<div
|
||||
className={`flex items-center gap-3 mt-2 justify-between
|
||||
|
||||
`}
|
||||
className={`flex items-center gap-3 mt-2 justify-between`}
|
||||
>
|
||||
{obj?.plateUrlInfrared && (
|
||||
<div
|
||||
className={`border p-1 ${
|
||||
primaryIsColour ? "" : "ring-2 ring-lime-400"
|
||||
} ${!obj ? "opacity-30" : ""}`}
|
||||
>
|
||||
<img
|
||||
src={obj?.plateUrlInfrared || BLANK_IMG}
|
||||
height={48}
|
||||
alt="infrared patch"
|
||||
className={!primaryIsColour ? "" : "opacity-60"}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div
|
||||
className={`border p-1 ${
|
||||
primaryIsColour ? "ring-2 ring-lime-400" : ""
|
||||
@@ -149,6 +132,13 @@ export default function SightingHistoryWidget({
|
||||
className={primaryIsColour ? "" : "opacity-60"}
|
||||
/>
|
||||
</div>
|
||||
{isHotListHit && (
|
||||
<img
|
||||
src={HotListImg}
|
||||
alt="hotlistHit"
|
||||
className="h-20 object-contain rounded-md"
|
||||
/>
|
||||
)}
|
||||
<NumberPlate motion={motionAway} vrm={obj?.vrm} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user