refactor: update positioning of NumberPlate in SightingOverview and clean up unused variables in SightingWidget
This commit is contained in:
@@ -28,14 +28,13 @@ const SightingOverview = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col md:flex-row">
|
<div className="flex flex-col md:flex-row">
|
||||||
|
<NavigationArrow side={side} />
|
||||||
|
<div className="w-full">
|
||||||
{mostRecent && (
|
{mostRecent && (
|
||||||
<div className="z-30 px-1 pt-2">
|
<div className="absolute inset-0 z-50 px-1 pt-2">
|
||||||
<NumberPlate vrm={mostRecent?.vrm} size="sm" />
|
<NumberPlate vrm={mostRecent?.vrm} size="sm" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<NavigationArrow side={side} />
|
|
||||||
<div className="w-full">
|
|
||||||
<img
|
<img
|
||||||
ref={imgRef}
|
ref={imgRef}
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
|
|||||||
@@ -132,8 +132,6 @@ export default function SightingHistoryWidget({
|
|||||||
const isNPEDHitD =
|
const isNPEDHitD =
|
||||||
obj?.metadata?.npedJSON?.["NPED CATEGORY"] === "D";
|
obj?.metadata?.npedJSON?.["NPED CATEGORY"] === "D";
|
||||||
const motionAway = (obj?.motion ?? "").toUpperCase() === "AWAY";
|
const motionAway = (obj?.motion ?? "").toUpperCase() === "AWAY";
|
||||||
const primaryIsColour = obj?.srcCam === 1;
|
|
||||||
const secondaryMissing = (obj?.vrmSecondary ?? "") === "";
|
|
||||||
const isHotListHit =
|
const isHotListHit =
|
||||||
obj?.metadata?.hotlistMatches?.Hotlist0 === true;
|
obj?.metadata?.hotlistMatches?.Hotlist0 === true;
|
||||||
return (
|
return (
|
||||||
@@ -147,17 +145,12 @@ export default function SightingHistoryWidget({
|
|||||||
isNPEDHitD ? " border-amber-600" : ""
|
isNPEDHitD ? " border-amber-600" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div
|
<div className={`border p-1 `}>
|
||||||
className={`border p-1 ${
|
|
||||||
primaryIsColour ? "ring-2 ring-lime-400" : ""
|
|
||||||
} ${secondaryMissing && primaryIsColour ? "" : ""}`}
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
src={obj?.plateUrlColour || BLANK_IMG}
|
src={obj?.plateUrlColour || BLANK_IMG}
|
||||||
height={48}
|
height={48}
|
||||||
width={200}
|
width={200}
|
||||||
alt="colour patch"
|
alt="colour patch"
|
||||||
className={primaryIsColour ? "" : ""}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{isHotListHit && (
|
{isHotListHit && (
|
||||||
|
|||||||
Reference in New Issue
Block a user