gnss/frontend/src/components/TrackSummary.tsx

21 lines
565 B
TypeScript
Raw Normal View History

import { formatTime } from "../utils/time";
import type { TrackPoint } from "../types";
type TrackSummaryProps = {
lastPoint: TrackPoint | null;
pointsCount: number;
};
export const TrackSummary = ({ lastPoint, pointsCount }: TrackSummaryProps) => (
<div className="mini-info">
<div className="chip">
<span>Последняя фиксация</span>
<strong>{formatTime(lastPoint?.timestamp)}</strong>
</div>
<div className="chip">
<span>Точек трека</span>
<strong>{pointsCount}</strong>
</div>
</div>
);