gnss/frontend/src/components/TrackSummary.tsx

26 lines
753 B
TypeScript
Raw Normal View History

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 14:11:32 +05:00
export const TrackSummary = ({ lastPoint, pointsCount, compact }: TrackSummaryProps) => (
<div className={`mini-info ${compact ? "compact" : ""}`}>
<div className="chip small">
<span>Последняя фиксация</span>
<strong>{formatTime(lastPoint?.timestamp)}</strong>
</div>
2025-12-19 14:11:32 +05:00
<div className="chip small">
<span>Точек трека</span>
<strong>{pointsCount}</strong>
</div>
2025-12-19 14:11:32 +05:00
<div className="chip small">
<span>Статус</span>
<strong>ок</strong>
</div>
</div>
);