From 772428cd035cbd021dc553e06e2c8ac6743d0edb Mon Sep 17 00:00:00 2001 From: Kalashnikov Igor Date: Tue, 15 Oct 2024 14:13:46 +0300 Subject: [PATCH] feat(ui): display exact timestamp in the last seen device list field (#2153) --- src/components/LastSeen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LastSeen.tsx b/src/components/LastSeen.tsx index f5a9e2332..fd9f23c0f 100644 --- a/src/components/LastSeen.tsx +++ b/src/components/LastSeen.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { DeviceState, LastSeenType } from '../types'; import { format } from 'timeago.js'; -import { lastSeen } from '../utils'; +import { lastSeen, formatDate } from '../utils'; import { useTranslation } from 'react-i18next'; @@ -14,7 +14,7 @@ export function LastSeen(props: LastSeenProps): JSX.Element { const { state, lastSeenType } = props; const lastSeenDate = lastSeen(state, lastSeenType); if (lastSeenDate) { - return <>{format(lastSeenDate, i18n.language)}; + return {format(lastSeenDate, i18n.language)}; } else { return <>N/A; }