summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-listing.tsx
diff options
context:
space:
mode:
authorFilip785 <fdjuricic98@gmail.com>2020-07-08 19:46:18 +0200
committerFilip785 <fdjuricic98@gmail.com>2020-07-08 19:46:18 +0200
commit8fe8836bc263be11895fafa958409499c9e9fc9d (patch)
tree139c834b9f3245beeb7d7f101ce88c992ba77b8c /ui/src/components/post-listing.tsx
parent1b351e08aa1dfd4a6150111c9ce63b2251baa4fe (diff)
Updates to PR as requested
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r--ui/src/components/post-listing.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx
index 7199510b..92a2f9cb 100644
--- a/ui/src/components/post-listing.tsx
+++ b/ui/src/components/post-listing.tsx
@@ -33,6 +33,7 @@ import {
setupTippy,
hostname,
previewLines,
+ isCakeDay,
} from '../utils';
import { i18n } from '../i18next';
import { CakeDay } from './cake-day';
@@ -258,8 +259,6 @@ 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`}>
@@ -440,10 +439,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
}}
/>
- <CakeDay
- creator_name={creator_name}
- creator_published={creator_published}
- />
+ {isCakeDay(post.creator_published) && (
+ <CakeDay creator_name={post.creator_name} is_post_creator />
+ )}
{this.isMod && (
<span className="mx-1 badge badge-light">