import React from 'react'; import Image from 'next/image'; import Link from 'next/link'; import { getAllPosts } from '@/lib/blog'; import { getTranslations } from 'next-intl/server'; import { Section, Container, Heading, Card, Badge } from '../../components/ui'; interface RecentPostsProps { locale: string; data?: any; } export default async function RecentPosts({ locale, data }: RecentPostsProps) { const t = await getTranslations('Blog'); const posts = await getAllPosts(locale); const recentPosts = posts.slice(0, 3); if (recentPosts.length === 0) return null; const title = data?.title || t('allArticles'); const subtitle = data?.subtitle || t('latestNews'); return (
{title} {title}
); }