fixed type errors
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import type { SightingType, SightingWidgetType } from "../../types/types";
|
||||
import type { SightingType } from "../../types/types";
|
||||
import { capitalize, formatAge } from "../../utils/utils";
|
||||
|
||||
type InfoBarprops = {
|
||||
obj: SightingWidgetType | SightingType;
|
||||
obj: SightingType;
|
||||
};
|
||||
const InfoBar = ({ obj }: InfoBarprops) => {
|
||||
const isNPEDHit = obj?.metadata?.npedJSON?.status_code === 404;
|
||||
return (
|
||||
<div className="flex items-center gap-3 text-xs bg-neutral-900 px-2 py-1 rounded justify-between">
|
||||
<div className="flex items-center gap-3 text-xs">
|
||||
{" "}
|
||||
<div className="min-w-14">CH: {obj ? obj.charHeight : "—"}</div>
|
||||
<div className="min-w-14">Seen: {obj ? obj.seenCount : "—"}</div>
|
||||
<div className="min-w-20">{obj ? capitalize(obj.motion) : "—"}</div>
|
||||
|
||||
Reference in New Issue
Block a user