import Image from "next/image"; import PostDate from "@/components/post-date"; import { Mail } from "lucide-react"; import { urlFor } from "@/sanity/lib/image"; import { POST_QUERY_RESULT } from "@/sanity.types"; type PostHeroProps = NonNullable; export default function PostHero({ title, author, image, slug, _createdAt, }: PostHeroProps) { return ( <> {title &&

{title}

} {image && image.asset?._id && (
{image.alt
)}
{author?.image && author.image.asset?._id && (
{author.image.alt
)} {author?.name &&
{author.name}
}
•
Share this post

); }