refactor: format
TS Lint / ESLint (push) Has been cancelled
TS Lint / Oxlint (push) Has been cancelled
TS Lint / TypeScript (push) Has been cancelled

This commit is contained in:
2026-07-14 11:47:05 +02:00
parent 566f8403ef
commit a9b2e31d81
17 changed files with 432 additions and 183 deletions
+6 -2
View File
@@ -1,6 +1,10 @@
import { formatDistanceToNow } from "date-fns";
import { enUS, fr } from 'date-fns/locale';
import { enUS, fr } from "date-fns/locale";
export function relativeTime(date: Date, locale: string): string {
return formatDistanceToNow(date, {addSuffix: true, includeSeconds: false, locale: locale === 'fr' ? fr : enUS});
return formatDistanceToNow(date, {
addSuffix: true,
includeSeconds: false,
locale: locale === "fr" ? fr : enUS,
});
}