import type { SightingType } from "../../types/types"; import { capitalize, formatAge } from "../../utils/utils"; type InfoBarprops = { obj: SightingType; }; const InfoBar = ({ obj }: InfoBarprops) => { const isNPEDHitD = obj?.metadata?.npedJSON?.["NPED CATEGORY"] === "D"; return (
CH: {obj ? obj.charHeight : "—"}
Seen: {obj ? obj.seenCount : "—"}
{obj ? capitalize(obj.motion) : "—"}
{obj ? formatAge(obj.timeStampMillis) : "—"}
{isNPEDHitD ? ( NPED HIT CAT D ) : ( "" )}
); }; export default InfoBar;