summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user-listing.tsx
diff options
context:
space:
mode:
authorderek <wwsage@gmail.com>2020-07-13 20:09:39 -0400
committerderek <wwsage@gmail.com>2020-07-13 20:09:39 -0400
commitd71897620ceea58b2d314242ea2f646a466d338e (patch)
tree8b32a1e5f3e06e7c2a6be03827730bb8fdb0679e /ui/src/components/user-listing.tsx
parente7b9ab1b3a4926d5d32ed9e87792cc9d39d4ede5 (diff)
parent52983907c4d1b7fda1182316cb631f9b5e913f5b (diff)
Merge remote-tracking branch 'LemmyNet/master'
Diffstat (limited to 'ui/src/components/user-listing.tsx')
-rw-r--r--ui/src/components/user-listing.tsx35
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_} />}
+ </>
);
}
}