import React from "react" import util from "../lib/util" import { Badge } from "../lib/common/badge" import { Progress } from "../lib/common/progressBar" import moment from "moment" import { TrackingGifSvg } from "../assets/svg/trackingGif" const StatusBadge = (props: { color: string, label: string }) => { return (
{props.label}
{trip_delay > 0 ? `${handleTimeLeft}D Delay` : 'On time'} {_eta}
: null}{last_location_address ?? ''}
{last_location_at ? ` , ${moment(last_location_at).format('DD-MMM HH:mm')}` : ''}
Total : {kilometer} km
Remaining: {isDestinationReached ? 0 : remaining_kilometer} km