Skip to content

Commit c229fad

Browse files
committed
removing short from formatDate example
1 parent 1654199 commit c229fad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-inbox/README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -634,14 +634,12 @@ Example using [date-fns](https://date-fns.org):
634634
import formatDistanceStrict from "date-fns/formatDistanceStrict";
635635
import { Locale } from "date-fns";
636636
637-
const getTimeAgoShort = (created: string, locale: Locale) => {
638-
const timeAgo = formatDistanceStrict(new Date(created).getTime(), Date.now(), {
637+
const getTimeAgo = (created: string, locale: Locale) => {
638+
return formatDistanceStrict(new Date(created).getTime(), Date.now(), {
639639
addSuffix: true,
640640
roundingMethod: "floor",
641641
locale
642642
})(created);
643-
644-
return timeAgo;
645643
}
646644
647645
---

0 commit comments

Comments
 (0)