import React from 'react'; import { Head, Link, usePage } from '@inertiajs/react'; import { useTranslation } from 'react-i18next'; import MarketingLayout from '@/layouts/marketing/MarketingLayout'; interface Props { posts: { data: any[]; links: any[]; current_page: number; last_page: number; }; } const Blog: React.FC = ({ posts }) => { const { url } = usePage(); const { t } = useTranslation('marketing'); const renderPagination = () => { if (!posts.links || posts.links.length <= 3) return null; return (
{posts.links.map((link, index) => ( ))}
); }; return ( {/* Hero Section */}

{t('blog.hero_title')}

{t('blog.hero_description')}

{t('blog.hero_cta')}
{/* Posts Section */}

{t('blog.posts_title')}

{posts.data.length > 0 ? ( <>
{posts.data.map((post) => (
{post.featured_image && ( {post.title} )}

{post.title}

{post.excerpt}

{t('blog.by')} {post.author?.name || t('blog.team')} | {t('blog.published_at')} {post.published_at}

{t('blog.read_more')}
))}
{renderPagination()} ) : (

{t('blog.empty')}

)}
); }; export default Blog;