"use client"; import { motion } from "framer-motion"; import Image from "next/image"; import Link from "next/link"; import { urlFor } from "@/lib/sanity"; interface FeaturedBlogCardProps { post: { _id: string; title: string; slug: { current: string }; summary?: string; formattedDate?: string; mainImage?: any; mainImageUrl?: string; author?: { name?: string; title?: string; image?: any; }; }; } export function FeaturedBlogCard({ post }: FeaturedBlogCardProps) { return (
{/* Content */}
{post.formattedDate && (
{post.formattedDate}
)}

{post.title}

{post.summary && (

{post.summary}

)} {post.author && (
{post.author.image ? (
{post.author.name
) : (
)}
{post.author.name && (
{post.author.name}
)} {post.author.title && (
{post.author.title}
)}
)}
{/* Image */}
{post.mainImage ? ( {post.title} ) : post.mainImageUrl ? ( {post.title} ) : (
)}
); }