import { FC } from 'react'
import MiniBlogItem from './MiniBlogItem'
import { Blog } from '../types/Types'

interface LastPostProps {
    blogs: Blog[]
}

const LastPost: FC<LastPostProps> = ({ blogs }) => {
    return (
        <div className='w-full'>
            <div className='font-bold text-base sm:text-lg mb-4'>
                آخرین پست ها و مطالب
            </div>

            <div className='space-y-4'>
                {blogs.map((blog) => (
                    <MiniBlogItem key={blog._id} blog={blog} />
                ))}
            </div>
        </div>
    )
}

export default LastPost