manifold/web/components/nav/profile-menu.tsx
Marshall Polaris 515928a69a
Turn on no unused variables linting, kill dead code (#484)
* Slightly fix up ChoicesToggleGroup

* Kill a bunch of dead code and unused variables

* Turn on no-unused-vars lint

* Un-kill some dead code that James likes
2022-06-12 19:04:55 -07:00

21 lines
691 B
TypeScript

import Link from 'next/link'
import { User } from 'web/lib/firebase/users'
import { formatMoney } from 'common/util/format'
import { Avatar } from '../avatar'
export function ProfileSummary(props: { user: User }) {
const { user } = props
return (
<Link href={`/${user.username}`}>
<a className="group flex flex-row items-center gap-4 rounded-md py-3 text-gray-500 hover:bg-gray-100 hover:text-gray-700">
<Avatar avatarUrl={user.avatarUrl} username={user.username} noLink />
<div className="truncate">
<div>{user.name}</div>
<div className="text-sm">{formatMoney(Math.floor(user.balance))}</div>
</div>
</a>
</Link>
)
}