added sighting feed

This commit is contained in:
2025-08-20 08:27:05 +01:00
parent 9288540957
commit 44af1b21b7
17 changed files with 621 additions and 47 deletions

View File

@@ -1,17 +1,17 @@
import { GB } from "country-flag-icons/react/3x2";
import { formatNumberPlate } from "../../utils/utils";
import type { SightingType } from "../../types/types";
type NumberPlateProps = {
sighting: SightingType;
vrm?: string | undefined;
motion?: boolean;
};
const NumberPlate = ({ sighting }: NumberPlateProps) => {
const NumberPlate = ({ motion, vrm }: NumberPlateProps) => {
return (
<div
className={`relative w-[8rem] border-4 border-black rounded-lg text-nowrap
text-black px-3
${sighting?.motion !== "towards" ? "bg-yellow-400" : "bg-white"}
${motion ? "bg-yellow-400" : "bg-white"}
`}
>
<div className="">
@@ -19,7 +19,7 @@ const NumberPlate = ({ sighting }: NumberPlateProps) => {
<GB />
</div>
<p className=" pl-2 font-extrabold text-right">
{formatNumberPlate(sighting?.vrm)}
{vrm && formatNumberPlate(vrm)}
</p>
</div>
</div>