saladday1's picture
code: sync from git
2471af3 verified
Raw History Blame
501 Bytes
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import type { Author } from "@/lib/types"
export function Who({ name, authors, size = "size-8" }: { name: string; authors: Record<string, Author>; size?: string }) {
const a = authors[name]
return (
<Avatar className={`${size} shrink-0`}>
{a?.a && <AvatarImage src={a.a} alt="" loading="lazy" />}
<AvatarFallback className="text-sm">{name.slice(0, 1).toUpperCase()}</AvatarFallback>
</Avatar>
)
}