import React from 'react'; import { useParams, Link } from 'react-router-dom'; import { useI18n } from '../hooks/useI18n'; import { SEO } from '../components/SEO'; import { TableOfContents } from '../components/TableOfContents'; import { Newsletter } from '../components/Newsletter'; import { PostCard } from '../components/PostCard'; import { formatDate } from '../lib/utils'; import { ArrowLeft, Clock, Twitter, Linkedin, Link as LinkIcon, Cpu, Terminal } from 'lucide-react'; import { motion } from 'motion/react'; import Markdown from 'react-markdown'; export default function PostDetail() { const { slug } = useParams<{ slug: string }>(); const { lang, posts, t } = useI18n(); const validPosts = posts || []; const post = validPosts.find(p => p.slug === slug); const relatedPosts = validPosts.filter(p => p.slug !== slug && (p.category === post?.category || p.featured)).slice(0, 3); if (!post) { return (

[error] 404_NOT_FOUND

RETURN_TO_BASE
); } return (
{/* Technical Header */}
cd ../blog
{post.category}
READ_TIME: {post.readingTime}

{post.title}

{post.description}

{post.author[0]}
{post.author} system_editor
timestamp {formatDate(post.date, lang)}
{/* Featured Technical Image */}
{post.title}
IMG_REF: {post.slug}.jpg
{/* Content Section */}
{/* Main Article body */}
{post.content}
{/* Sidebar */}
{/* Related Technical Modules */} {relatedPosts.length > 0 && (
REL_MODULES

Módulos Relacionados

view_all_entries
{relatedPosts.map(post => (
))}
)}
); }