import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { format } from "date-fns"; import { Calendar, Clock, ArrowLeft, User } from "lucide-react"; const BlogPost = ({ post, children, }: { post: any; children: React.ReactNode; }) => { const { title, authorName, image, pubDate, description, authorImage } = post.data; return ( <> {/* Hero section with gradient background and post info */} {title} {description} {/* Author info */} {authorImage ? ( ) : ( {authorName || "Anonymous"} Author )} {/* Date info */} {format(pubDate, "MMMM d, yyyy")} 5 min read {/* Featured image */} {image && ( )} {/* Article content */} {children} > ); }; export { BlogPost };
{description}