import type { SightingType } from "../../types/types"; import NumberPlate from "../PlateStack/NumberPlate"; import SightingModal from "../SightingModal/SightingModal"; import InfoBar from "../SightingsWidget/InfoBar"; import { useState } from "react"; import HotListImg from "/Hotlist_Hit.svg"; type AlertItemProps = { item: SightingType; }; const AlertItem = ({ item }: AlertItemProps) => { const [isModalOpen, setIsModalOpen] = useState(false); const motionAway = (item?.motion ?? "").toUpperCase() === "AWAY"; const isHotListHit = item?.metadata?.hotlistMatches?.Hotlist0 === true; const handleClick = () => { setIsModalOpen(true); }; const closeModal = () => { setIsModalOpen(false); }; return ( <>
{isHotListHit && ( hotlistHit )}
MAKE: {item.make} MODEL: {item.model} COLOUR: {item.color}
); }; export default AlertItem;