We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e31bc2 commit 772428cCopy full SHA for 772428c
src/components/LastSeen.tsx
@@ -1,7 +1,7 @@
1
import React from 'react';
2
import { DeviceState, LastSeenType } from '../types';
3
import { format } from 'timeago.js';
4
-import { lastSeen } from '../utils';
+import { lastSeen, formatDate } from '../utils';
5
6
import { useTranslation } from 'react-i18next';
7
@@ -14,7 +14,7 @@ export function LastSeen(props: LastSeenProps): JSX.Element {
14
const { state, lastSeenType } = props;
15
const lastSeenDate = lastSeen(state, lastSeenType);
16
if (lastSeenDate) {
17
- return <>{format(lastSeenDate, i18n.language)}</>;
+ return <span title={formatDate(lastSeenDate)}>{format(lastSeenDate, i18n.language)}</span>;
18
} else {
19
return <>N/A</>;
20
}
0 commit comments