import { cn } from "@/lib/utils"; import Image from "next/image"; import { urlFor } from "@/sanity/lib/image"; import { ChevronRight } from "lucide-react"; import { POSTS_QUERY_RESULT } from "@/sanity.types"; type SanityPostItem = NonNullable; export interface PostCardProps { title?: string | null; excerpt?: string | null; image?: SanityPostItem["image"] | null; className?: string; } export default function PostCard({ className, title, excerpt, image, }: PostCardProps) { return (
{image && image.asset?._id ? (
{image.alt
Editorial Guide
) : (
Vietnam Wedding Guide
)} {title && (

{title}

)} {excerpt && (

{excerpt}

)}
Read Guide
); }