mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added Just now
as a timestamp
ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend
This commit is contained in:
parent
0cf5d11bf2
commit
4aa5e4f091
1 changed files with 5 additions and 1 deletions
|
@ -27,7 +27,11 @@ export const getRelativeTimestamp = (date: Date): string => {
|
|||
return `${interval}m`;
|
||||
}
|
||||
|
||||
return `${seconds} seconds`;
|
||||
if (seconds < 1) {
|
||||
return `Just now`;
|
||||
}
|
||||
|
||||
return `${seconds}s`;
|
||||
};
|
||||
|
||||
export default getRelativeTimestamp;
|
Loading…
Reference in a new issue