"use client"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { CircleUser, CircleUserRound } from "lucide-react"
import type { Gender } from "@/types/family"
interface AvatarDisplayProps {
imageUrl?: string // 改为 URL
fallbackText?: string
gender?: Gender
className?: string
}
export function AvatarDisplay({ imageUrl, fallbackText, gender, className }: AvatarDisplayProps) {
// 如果有头像 URL,显示头像
if (imageUrl) {
return (
{fallbackText}
)
}
// 没有头像,显示性别图标
return (
{gender === 'FEMALE' ? (
) : (
)}
)
}