"use client"; import Link from "next/link"; import { Button, Card, CardBody, CardFooter } from "@heroui/react"; import { RxCross2 } from "react-icons/rx"; import Image from "next/image"; import { Blog } from "@/types/blog"; interface BlogListProps { blogPosts: (Blog & { imageUrl: string | undefined })[]; } export function BlogList({ blogPosts }: BlogListProps) { return (

My Blog

{blogPosts.map(({ id, title, imageUrl, createdAt }) => ( {imageUrl && ( {title} )}

{title}

{createdAt && ( )}
))}
); }