2025-12-19 13:24:56 +05:00
|
|
|
|
import { formatTime } from "../utils/time";
|
|
|
|
|
|
import type { TrackPoint } from "../types";
|
|
|
|
|
|
|
|
|
|
|
|
type TrackSummaryProps = {
|
|
|
|
|
|
lastPoint: TrackPoint | null;
|
|
|
|
|
|
pointsCount: number;
|
2025-12-19 14:11:32 +05:00
|
|
|
|
compact?: boolean;
|
2025-12-19 13:24:56 +05:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-12-19 14:11:32 +05:00
|
|
|
|
export const TrackSummary = ({ lastPoint, pointsCount, compact }: TrackSummaryProps) => (
|
|
|
|
|
|
<div className={`mini-info ${compact ? "compact" : ""}`}>
|
|
|
|
|
|
<div className="chip small">
|
2025-12-19 13:24:56 +05:00
|
|
|
|
<span>Последняя фиксация</span>
|
|
|
|
|
|
<strong>{formatTime(lastPoint?.timestamp)}</strong>
|
|
|
|
|
|
</div>
|
2025-12-19 14:11:32 +05:00
|
|
|
|
<div className="chip small">
|
2025-12-19 13:24:56 +05:00
|
|
|
|
<span>Точек трека</span>
|
|
|
|
|
|
<strong>{pointsCount}</strong>
|
|
|
|
|
|
</div>
|
2025-12-19 14:11:32 +05:00
|
|
|
|
<div className="chip small">
|
|
|
|
|
|
<span>Статус</span>
|
|
|
|
|
|
<strong>ок</strong>
|
|
|
|
|
|
</div>
|
2025-12-19 13:24:56 +05:00
|
|
|
|
</div>
|
|
|
|
|
|
);
|