fix: convert ISO date strings to timestamps for formatRelativeTime

This commit is contained in:
rcourtman
2025-10-14 16:52:38 +00:00
parent a84f91a54c
commit cbf26f3c9a
2 changed files with 3 additions and 3 deletions
@@ -222,10 +222,10 @@ export const APITokenManager: Component<APITokenManagerProps> = (props) => {
<td class="py-2 px-3 text-gray-900 dark:text-gray-100">{token.name || 'Untitled token'}</td>
<td class="py-2 px-3 font-mono text-xs text-gray-600 dark:text-gray-400">{tokenHint(token)}</td>
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
{formatRelativeTime(token.createdAt)}
{formatRelativeTime(new Date(token.createdAt).getTime())}
</td>
<td class="py-2 px-3 text-gray-600 dark:text-gray-400">
{token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
{token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
</td>
<td class="py-2 px-3 text-right">
<button
@@ -336,7 +336,7 @@ WantedBy=multi-user.target`;
{token.prefix && token.suffix ? `${token.prefix}${token.suffix}` : '—'}
</td>
<td class="py-2 px-2 text-gray-600 dark:text-gray-400">
{token.lastUsedAt ? formatRelativeTime(token.lastUsedAt) : 'Never'}
{token.lastUsedAt ? formatRelativeTime(new Date(token.lastUsedAt).getTime()) : 'Never'}
</td>
</tr>
)}