import { FC } from 'react'
import MiniBlogItem from './MiniBlogItem'
import { useGetMostVisitedBlogs } from '../hooks/useBlogsData'

const MostVisited: FC = () => {
    const { data } = useGetMostVisitedBlogs()
    return (
        <div className='w-full rounded-4xl bg-white p-4'>
            <h4>
                پر بازدیدترین ها
            </h4>

            <div className='flex flex-col gap-6 mt-7 text-sm'>
                {
                    data?.data?.blogs?.map((item) => {
                        return <MiniBlogItem key={item.id} item={item} />
                    })
                }
            </div>
        </div>
    )
}

export default MostVisited