From 066ca4cfbc60c45705cc71f708369b934b30195e Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 16 Feb 2022 16:10:44 -0800 Subject: [PATCH] Fix build; add a white ring around users --- web/components/avatar.tsx | 6 ++++-- web/components/user-page.tsx | 8 ++++++-- web/pages/profile.tsx | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/web/components/avatar.tsx b/web/components/avatar.tsx index b487de6d..5f9aa074 100644 --- a/web/components/avatar.tsx +++ b/web/components/avatar.tsx @@ -7,8 +7,9 @@ export function Avatar(props: { avatarUrl?: string noLink?: boolean size?: number + className?: string }) { - const { username, avatarUrl, noLink, size } = props + const { username, avatarUrl, noLink, size, className } = props const s = size || 10 const onClick = @@ -25,7 +26,8 @@ export function Avatar(props: { className={clsx( 'flex items-center justify-center rounded-full object-cover', `w-${s} h-${s}`, - !noLink && 'cursor-pointer' + !noLink && 'cursor-pointer', + className )} src={avatarUrl} onClick={onClick} diff --git a/web/components/user-page.tsx b/web/components/user-page.tsx index 5dda5630..f0c9e70d 100644 --- a/web/components/user-page.tsx +++ b/web/components/user-page.tsx @@ -55,8 +55,12 @@ export function UserPage(props: { user: User; currentUser?: User }) { }} />
- {/* TODO: add a white ring to the avatar */} - +
{/* Profile details: name, username, bio, and link to twitter/discord */} diff --git a/web/pages/profile.tsx b/web/pages/profile.tsx index 34cbe555..9ee1e6ca 100644 --- a/web/pages/profile.tsx +++ b/web/pages/profile.tsx @@ -17,7 +17,8 @@ import { uploadImage } from '../lib/firebase/storage' import { Col } from '../components/layout/col' import { Row } from '../components/layout/row' import { User } from '../../common/user' -import { defaultBannerUrl, updateUser } from '../lib/firebase/users' +import { updateUser } from '../lib/firebase/users' +import { defaultBannerUrl } from '../components/user-page' function EditUserField(props: { user: User