Skip to content

Commit cbf26f3

Browse files
committed
fix: convert ISO date strings to timestamps for formatRelativeTime
1 parent a84f91a commit cbf26f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend-modern/src/components/Settings/APITokenManager.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ export const APITokenManager: Component<APITokenManagerProps> = (props) => {
222222
<td class="py-2 px-3 text-gray-900 dark:text-gray-100">{token.name || 'Untitled token'}</td>
223223
<td class="py-2 px-3 font-mono text-xs text-gray-600 dark:text-gray-400">{tokenHint(token)}</td>
224224
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
225-
{formatRelativeTime(token.createdAt)}
225+
{formatRelativeTime(new Date(token.createdAt).getTime())}
226226
</td>
227227
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
228-
{token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
228+
{token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
229229
</td>
230230
<td class="py-2 px-3 text-right">
231231
<button

frontend-modern/src/components/Settings/DockerAgents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ WantedBy=multi-user.target`;
336336
{token.prefix && token.suffix ? `${token.prefix}${token.suffix}` : '—'}
337337
</td>
338338
<td class="py-2 px-2 text-gray-600 dark:text-gray-400">
339-
{token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
339+
{token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
340340
</td>
341341
</tr>
342342
)}

0 commit comments

Comments
 (0)