File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 29
29
"framer-motion" : " ^11.5.6" ,
30
30
"howler" : " ^2.2.4" ,
31
31
"ioredis" : " ^5.4.1" ,
32
+ "javascript-time-ago" : " ^2.5.11" ,
32
33
"js-confetti" : " ^0.12.0" ,
33
34
"js-cookie" : " ^3.0.5" ,
34
35
"lucide-react" : " ^0.446.0" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import { SignpostFeedItem } from '@/app/utils/data'
4
4
import JaggedCardSmall from '@/components/jagged-card-small'
5
5
import Cookies from 'js-cookie'
6
6
import Markdown from 'react-markdown'
7
+ import TimeAgo from 'javascript-time-ago'
8
+ import en from 'javascript-time-ago/locale/en'
9
+
10
+ TimeAgo . addDefaultLocale ( en )
11
+ const timeAgo = new TimeAgo ( 'en-US' )
7
12
8
13
export default function FeedItems ( ) {
9
14
const cookie = Cookies . get ( 'signpost-feed' )
@@ -26,6 +31,9 @@ export default function FeedItems() {
26
31
{ feedItems . map ( ( item , idx ) => {
27
32
return (
28
33
< JaggedCardSmall key = { idx } bgColor = { `#${ item . backgroundColor } ` } >
34
+ < p className = "text-sm text-muted" >
35
+ { timeAgo . format ( new Date ( item . createdTime ) ) }
36
+ </ p >
29
37
< p style = { { color : `#${ item . textColor } ` } } >
30
38
< span className = "text-xl" >
31
39
{ item . title }
You can’t perform that action at this time.
0 commit comments