import type { SightingType, SightingWidgetType } from "../../types/types"; import { capitalize, formatAge } from "../../utils/utils"; type InfoBarprops = { obj: SightingWidgetType | SightingType; }; const InfoBar = ({ obj }: InfoBarprops) => { const isNPEDHit = obj?.metadata?.npedJSON?.status_code === 404; return (
{" "}
CH: {obj ? obj.charHeight : "—"}
Seen: {obj ? obj.seenCount : "—"}
{obj ? capitalize(obj.motion) : "—"}
{obj ? formatAge(obj.timeStampMillis) : "—"}
{isNPEDHit ? ( NPED HIT ) : ( "" )}
); }; export default InfoBar;