From 59b98ab7308f80f144b907e32984c429a94db969 Mon Sep 17 00:00:00 2001 From: Tim Baek Date: Sun, 8 Feb 2026 03:42:57 +0400 Subject: [PATCH] refac --- src/lib/components/layout/Sidebar/ChatItem.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index c73f46578..f9ec3f902 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -63,7 +63,9 @@ const hours = Math.floor(minutes / 60); const days = Math.floor(hours / 24); const weeks = Math.floor(days / 7); + const years = Math.floor(days / 365); + if (years > 0) return `${years}y`; if (weeks > 0) return `${weeks}w`; if (days > 0) return `${days}d`; if (hours > 0) return `${hours}h`;