File size: 501 Bytes
2471af3
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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>
  )
}