@@ -43,13 +43,19 @@ export interface PostProps {
4343 | null ;
4444 reactions : Reaction [ ] ;
4545 } ;
46+ readonly shared ?: Date ;
4647 readonly pinned ?: boolean ;
4748 readonly quoted ?: boolean ;
4849}
4950
50- export function Post ( { post, pinned, quoted } : PostProps ) {
51+ export function Post ( { post, shared , pinned, quoted } : PostProps ) {
5152 if ( post . sharing != null )
52- return < Post post = { { ...post . sharing , sharing : null } } /> ;
53+ return (
54+ < Post
55+ post = { { ...post . sharing , sharing : null } }
56+ shared = { post . published ?? undefined }
57+ />
58+ ) ;
5359 const account = post . account ;
5460 const authorNameHtml = renderCustomEmojis ( account . name , account . emojis ) ;
5561 const authorUrl = account . url ?? account . iri ;
@@ -110,10 +116,26 @@ export function Post({ post, pinned, quoted }: PostProps) {
110116 ) }
111117 < footer >
112118 < p >
119+ { shared != null && (
120+ < small >
121+ Shared at{ " " }
122+ < time dateTime = { shared . toISOString ( ) } >
123+ { shared . toLocaleString ( "en" , {
124+ dateStyle : "medium" ,
125+ timeStyle : "short" ,
126+ } ) }
127+ </ time > { " " }
128+ ·{ " " }
129+ </ small >
130+ ) }
113131 < a href = { post . url ?? post . iri } >
114132 < small >
133+ Published at{ " " }
115134 < time dateTime = { ( post . published ?? post . updated ) . toISOString ( ) } >
116- { ( post . published ?? post . updated ) . toLocaleString ( ) }
135+ { ( post . published ?? post . updated ) . toLocaleString ( "en" , {
136+ dateStyle : "medium" ,
137+ timeStyle : "short" ,
138+ } ) }
117139 </ time >
118140 </ small >
119141 </ a >
0 commit comments