Add graphs on stats page, suggestions improvements, only fetch on focus

This commit is contained in:
2024-06-24 20:52:35 +02:00
parent 2a58e8f2ea
commit 38ca48b6b5
20 changed files with 615 additions and 49 deletions
+4
View File
@@ -9,6 +9,10 @@ export default function timeAgo(previous: Date) {
const now = new Date();
const elapsed : number = (now.getTime() - previous.getTime());
if(elapsed < 0){
return 'recently';
}
if (elapsed < msPerMinute) {
return Math.round(elapsed/1000) + ' seconds ago';
}