Use Avatar in leaderboard

Removes the extra ring
This commit is contained in:
Austin Chen 2022-02-05 22:13:13 -08:00
parent 4c3119c9ec
commit 0223ecdac2

View File

@ -1,5 +1,6 @@
import clsx from 'clsx'
import { User } from '../../common/user'
import { Avatar } from './avatar'
import { Row } from './layout/row'
import { SiteLink } from './site-link'
import { Title } from './title'
@ -38,13 +39,7 @@ export function Leaderboard(props: {
<td>
<SiteLink className="relative" href={`/${user.username}`}>
<Row className="items-center gap-4">
<img
className="rounded-full bg-gray-400 flex-shrink-0 ring-8 ring-gray-50"
src={user.avatarUrl || ''}
alt=""
width={32}
height={32}
/>
<Avatar avatarUrl={user.avatarUrl} size={8} />
<div className="truncate">{user.name}</div>
</Row>
</SiteLink>