Skip to content

Commit 772428c

Browse files
authored
feat(ui): display exact timestamp in the last seen device list field (#2153)
1 parent 6e31bc2 commit 772428c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/LastSeen.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { DeviceState, LastSeenType } from '../types';
33
import { format } from 'timeago.js';
4-
import { lastSeen } from '../utils';
4+
import { lastSeen, formatDate } from '../utils';
55

66
import { useTranslation } from 'react-i18next';
77

@@ -14,7 +14,7 @@ export function LastSeen(props: LastSeenProps): JSX.Element {
1414
const { state, lastSeenType } = props;
1515
const lastSeenDate = lastSeen(state, lastSeenType);
1616
if (lastSeenDate) {
17-
return <>{format(lastSeenDate, i18n.language)}</>;
17+
return <span title={formatDate(lastSeenDate)}>{format(lastSeenDate, i18n.language)}</span>;
1818
} else {
1919
return <>N/A</>;
2020
}

0 commit comments

Comments
 (0)