diff options
author | Dessalines <tyhou13@gmx.com> | 2020-07-09 19:59:02 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-07-09 19:59:02 -0400 |
commit | d222c60cef289b57f0ce350e9f24ce2df4792ef5 (patch) | |
tree | c2ddf596c3c26f8e42ada8b537473bd7322d7074 /ui/src/components/user-listing.tsx | |
parent | 7c35fc546bb148047087db6ed95b1579bab08238 (diff) |
A few cake day fixes. #916
Diffstat (limited to 'ui/src/components/user-listing.tsx')
-rw-r--r-- | ui/src/components/user-listing.tsx | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/ui/src/components/user-listing.tsx b/ui/src/components/user-listing.tsx index 0e150b94..58475d3e 100644 --- a/ui/src/components/user-listing.tsx +++ b/ui/src/components/user-listing.tsx @@ -1,7 +1,13 @@ import { Component } from 'inferno'; import { Link } from 'inferno-router'; import { UserView } from '../interfaces'; -import { pictrsAvatarThumbnail, showAvatars, hostname } from '../utils'; +import { + pictrsAvatarThumbnail, + showAvatars, + hostname, + isCakeDay, +} from '../utils'; +import { CakeDay } from './cake-day'; interface UserOther { name: string; @@ -9,6 +15,7 @@ interface UserOther { avatar?: string; local?: boolean; actor_id?: string; + published?: string; } interface UserListingProps { @@ -35,17 +42,21 @@ export class UserListing extends Component<UserListingProps, any> { } return ( - <Link className="text-body font-weight-bold" to={link}> - {user.avatar && showAvatars() && ( - <img - height="32" - width="32" - src={pictrsAvatarThumbnail(user.avatar)} - class="rounded-circle mr-2" - /> - )} - <span>{name_}</span> - </Link> + <> + <Link className="text-body font-weight-bold" to={link}> + {user.avatar && showAvatars() && ( + <img + height="32" + width="32" + src={pictrsAvatarThumbnail(user.avatar)} + class="rounded-circle mr-2" + /> + )} + <span>{name_}</span> + </Link> + + {isCakeDay(user.published) && <CakeDay creatorName={name_} />} + </> ); } } |