2022-05-14 01:07:44 +00:00
|
|
|
import Link from 'next/link'
|
2022-05-09 13:04:36 +00:00
|
|
|
import { firebaseLogout, User } from 'web/lib/firebase/users'
|
|
|
|
import { formatMoney } from 'common/util/format'
|
2022-03-17 07:50:45 +00:00
|
|
|
import { Avatar } from '../avatar'
|
2022-05-09 13:04:36 +00:00
|
|
|
import { IS_PRIVATE_MANIFOLD } from 'common/envs/constants'
|
2021-12-20 03:12:12 +00:00
|
|
|
|
2022-05-14 01:07:44 +00:00
|
|
|
export function ProfileSummary(props: { user: User }) {
|
2021-12-20 03:12:12 +00:00
|
|
|
const { user } = props
|
|
|
|
return (
|
2022-05-14 01:07:44 +00:00
|
|
|
<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 />
|
2022-01-27 23:24:44 +00:00
|
|
|
|
2022-05-14 01:07:44 +00:00
|
|
|
<div className="truncate">
|
|
|
|
<div>{user.name}</div>
|
|
|
|
<div className="text-sm">{formatMoney(Math.floor(user.balance))}</div>
|
2022-01-08 18:14:20 +00:00
|
|
|
</div>
|
2022-05-14 01:07:44 +00:00
|
|
|
</a>
|
|
|
|
</Link>
|
2021-12-20 03:12:12 +00:00
|
|
|
)
|
|
|
|
}
|