fix(ui): показывать время получения аналитики потоков
This commit is contained in:
1 parent
7318c5286b
commit
65241c94e9
6 files changed
+70
-12
No files matched your search
@@ -0,0 +1,15 @@
|
||||
/** Receipt time is not the timestamp of a network measurement. */
|
||||
export function TrafficDataTime({ label, receivedAt, source }: {
|
||||
label: string
|
||||
receivedAt?: number | null
|
||||
source: "API" | "live-поток"
|
||||
}) {
|
||||
if (receivedAt == null || !Number.isFinite(receivedAt)) return null
|
||||
const date = new Date(receivedAt)
|
||||
return (
|
||||
<p aria-label={label} className="text-xs text-muted-foreground mb-3 break-words">
|
||||
Получено ({source}): <time dateTime={date.toISOString()}>{date.toLocaleString("ru-RU")}</time>
|
||||
{" · время измерения не предоставлено"}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user