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; } export default async function RecentPosts({ locale }: RecentPostsProps) { const t = await getTranslations('Blog'); const posts = await getAllPosts(locale); const recentPosts = posts.slice(0, 3); if (recentPosts.length === 0) return null; return (
{t('allArticles')} {t('allArticles')}
); }