import React, { useEffect } from 'react'; import { useParams, Link } from 'react-router-dom'; import { ArrowLeft, User, Calendar, Share2 } from 'lucide-react'; import { MOCK_BLOG_POSTS } from '../services/mockData'; const BlogPostPage = () => { const { id } = useParams(); const post = MOCK_BLOG_POSTS.find(p => p.id === id); // Scroll to top when loading a new post useEffect(() => { window.scrollTo(0, 0); }, [id]); if (!post) { return (

Article introuvable

L'article que vous recherchez n'existe pas ou a été supprimé.

Retour au blog
); } return (
{/* Hero Image */}
{post.title}
Retour aux articles
{/* Header */}
{post.author} {post.date} Conseils

{post.title}

{/* Content */}

{post.excerpt}

{/* Rendering paragraphs manually for the mock data */} {post.content.split('\n').map((paragraph, index) => ( paragraph.trim() !== '' && (

{paragraph}

) ))}
{/* Footer / Share */}

Vous avez aimé cet article ?

); }; export default BlogPostPage;