import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import { BookOpen, Calendar, Clock, ArrowLeft } from 'lucide-react'; import postsData from '../../data/posts.json'; import { getCategoryCover } from '../../pages/Blog'; export const LatestArticles: React.FC = () => { const featuredPosts = postsData.slice(0, 3); const [imgErrors, setImgErrors] = useState>({}); return (
{/* Section Header */}

آخرین تحلیل‌ها و آموزش‌های هوش مصنوعی

از آموزش پرامپت‌نویسی اصولی تا بررسی جدیدترین ترندهای هوش مصنوعی و کاربردهای صنعتی، در بیش از ۱۰۰ مقاله به‌روز.

مشاهده همه مقالات (بیش از ۱۰۰ مقاله)
{/* Articles Grid */}
{featuredPosts.map((post) => { const meta = getCategoryCover(post.categories[0] || ''); const hasImg = post.thumbnail && !imgErrors[post.id]; return (
{/* Cover */}
{hasImg ? ( <> {post.title} setImgErrors(prev => ({ ...prev, [post.id]: true }))} />
{post.categories[0] || 'هوش مصنوعی'}
) : (
Houshan
)}
{/* Content */}
{post.date} {post.readTime}

{post.title}

{post.excerpt}

{/* Read More Link */}
مطالعه کامل مقاله
); })}
); };