import { ChevronRight, MessageSquare, Eye, MoreHorizontal, Download } from 'lucide-react'; import { useArticle } from '../hooks/useApi'; interface MainContentProps { theme: 'light' | 'dark'; articleSlug: string | null; } export function MainContent({ theme, articleSlug }: MainContentProps) { const { data: article, isLoading, error } = useArticle(articleSlug); if (!articleSlug) { return (

Select an article from the sidebar to view its content

); } if (isLoading) { return (

Loading article...

); } if (error || !article) { return (

Error loading article

); } return (
{/* Breadcrumb */}
Learn {article.title?.slice(0, 10)}
{/* Action buttons */}
{/* Main heading */}

{article.title}

{/* Article metadata */} {article.updatedAt && (
Last updated: {new Date(article.updatedAt).toLocaleDateString()}
)} {/* Article content */}
{/* Footer */}
); }