import type { Article } from '../api/articles'; interface ReaderViewProps { article: Article; onClose: () => void; onToggleFavorite: (id: string) => void; } export function ReaderView({ article, onClose, onToggleFavorite }: ReaderViewProps) { // Determine content to show: full content > summary > default message let displayContent = article.content || article.summary || '

Aucun contenu disponible pour cet article.

'; // If we have a hero image, try to remove the first image from the content to avoid duplicates if (article.image_url) { // Simple regex to remove the first img tag if it exists at the start of the content // This is a heuristic and might need refinement, but handles the "duplicate" complaint common in RSS displayContent = displayContent.replace(/]*>/, ''); } return (
e.stopPropagation()} > {/* Close button for desktop */} {/* Hero Image Section */} {article.image_url && (
{article.title}
)}
{article.feed_title} • {article.published_at ? new Date(article.published_at).toLocaleDateString('fr-FR', { day: 'numeric', month: 'long', year: 'numeric' }) : 'Aujourd\'hui'}

{article.title}

Source d'origine
F.

FlowReader Lux Édition • 2026

{/* Mobile close button overlay */}
); }