diff --git a/apps/web/src/dashboard/app.js b/apps/web/src/dashboard/app.js index 58d0d8f..3a832e6 100644 --- a/apps/web/src/dashboard/app.js +++ b/apps/web/src/dashboard/app.js @@ -32,7 +32,6 @@ async function api(path, opts = {}) { // Format relative time function formatAgo(ms) { const s = Math.max(0, Math.floor(ms / 1000)); - if (s < 2) return 'just now'; if (s < 60) return `${s}s ago`; if (s < 3600) return `${Math.floor(s / 60)}m ago`; if (s < 86400)return `${Math.floor(s / 3600)}h ago`; diff --git a/apps/web/src/routes/dashboard.ts b/apps/web/src/routes/dashboard.ts index f35d27e..d2b5133 100644 --- a/apps/web/src/routes/dashboard.ts +++ b/apps/web/src/routes/dashboard.ts @@ -17,7 +17,7 @@ const eta = new Eta({ views: resolve(import.meta.dir, "../views"), cache: true, function timeAgoSSR(date: string | Date): string { const ts = new Date(date).getTime(); const s = Math.max(0, Math.floor((Date.now() - ts) / 1000)); - const text = s < 2 ? 'just now' : s < 60 ? `${s}s ago` : s < 3600 ? `${Math.floor(s/60)}m ago` : s < 86400 ? `${Math.floor(s/3600)}h ago` : `${Math.floor(s/86400)}d ago`; + const text = s < 60 ? `${s}s ago` : s < 3600 ? `${Math.floor(s/60)}m ago` : s < 86400 ? `${Math.floor(s/3600)}h ago` : `${Math.floor(s/86400)}d ago`; return `${text}`; }