summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-listing.tsx
diff options
context:
space:
mode:
authorFilip785 <fdjuricic98@gmail.com>2020-07-08 02:28:47 +0200
committerFilip785 <fdjuricic98@gmail.com>2020-07-08 02:28:47 +0200
commit68e9755e593bbd8230eab2a123e822022721f071 (patch)
treeae11c818f1678ab1780ab95872ecc68cc9114af4 /ui/src/components/post-listing.tsx
parent8fda7d00d5ec9e415b44aa10cff3c4d735563a20 (diff)
Add cake day display in user page & posts/comments #682
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r--ui/src/components/post-listing.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx
index 3d608842..e6b9721c 100644
--- a/ui/src/components/post-listing.tsx
+++ b/ui/src/components/post-listing.tsx
@@ -35,6 +35,7 @@ import {
previewLines,
} from '../utils';
import { i18n } from '../i18next';
+import { CakeDay } from './cake-day';
interface PostListingState {
showEdit: boolean;
@@ -253,6 +254,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
listing() {
let post = this.props.post;
+ const { creator_name, creator_published } = post;
+
return (
<div class="row">
<div className={`vote-bar col-1 pr-0 small text-center`}>
@@ -432,6 +435,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
actor_id: post.creator_actor_id,
}}
/>
+
+ <CakeDay
+ creator_name={creator_name}
+ creator_published={creator_published}
+ />
+
{this.isMod && (
<span className="mx-1 badge badge-light">
{i18n.t('mod')}