From 5c1bc78408871a562f3638ccf7efae4f655a579a Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 9 May 2022 10:18:05 -0400 Subject: [PATCH] Revert avatar component changes --- web/components/avatar.tsx | 48 ++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/web/components/avatar.tsx b/web/components/avatar.tsx index 706b61f3..318c5498 100644 --- a/web/components/avatar.tsx +++ b/web/components/avatar.tsx @@ -8,8 +8,10 @@ export function Avatar(props: { noLink?: boolean size?: number | 'xs' | 'sm' className?: string + containerClassName?: string }) { - const { username, avatarUrl, noLink, size, className } = props + const { username, avatarUrl, noLink, size, className, containerClassName } = + props const s = size == 'xs' ? 6 : size === 'sm' ? 8 : size || 10 const onClick = @@ -19,28 +21,32 @@ export function Avatar(props: { e.stopPropagation() Router.push(`/${username}`) } - - // there can be no avatar URL or username in the feed, we show a "submit comment" - // item with a fake grey user circle guy even if you aren't signed in - return avatarUrl ? ( - {username} - ) : ( - + {avatarUrl ? ( + {username} + ) : ( + // TODO: After 2022-03-01, can just assume that all contracts have an avatarUrl +