Update TimeAgo

This commit is contained in:
Tilen Komel
2025-01-30 18:03:28 +01:00
parent 97d206a9d4
commit 8ac714a5b5

View File

@@ -12,7 +12,7 @@ const getTimeAgo = (timestamp: number): string => {
if (secondsPast < 60) return `${secondsPast} seconds ago`;
if (secondsPast < 3600) return `${Math.floor(secondsPast / 60)} minutes ago`;
if (secondsPast < 86400) return `${Math.floor(secondsPast / 3600)} hours ago`;
return `${Math.floor(secondsPast / 86400)} days ago`;
return `${Math.floor(secondsPast / 86400)} days ago ${secondsPast}`;
};
export const TimeAgo = ({ timestamp }: TimeAgoProps): JSX.Element => {