gnss/frontend/src/components/TrackSummary.tsx
 Илья Шалонин 3d65d2b7e8 Крутой дизайн
2025-12-19 14:11:32 +05:00

25 lines
753 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { formatTime } from "../utils/time";
import type { TrackPoint } from "../types";
type TrackSummaryProps = {
lastPoint: TrackPoint | null;
pointsCount: number;
compact?: boolean;
};
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>
<div className="chip small">
<span>Точек трека</span>
<strong>{pointsCount}</strong>
</div>
<div className="chip small">
<span>Статус</span>
<strong>ок</strong>
</div>
</div>
);