import { Image } from "next-sanity/image"; import type { Author } from "@/sanity.types"; import { urlForImage } from "@/sanity/lib/utils"; interface Props { name: string; picture: Exclude | null; } export default function Avatar({ name, picture }: Props) { return (
{picture?.asset?._ref ? (
{picture?.alt
) : (
By
)}
{name}
); }