/* global React, ReactDOM, PageShell, TweaksPanel, Card, IconCircle, Button, BLOG_POSTS, EXAMES, GENERAL_WHATS */ /* Shared template for every /blog// page. Each page's index.html sets window.BLOG_SLUG before loading this file. */ function formatDate(iso) { const [y, m, d] = iso.split("-"); return d + "/" + m + "/" + y; } function BlogPostPage() { const slug = window.BLOG_SLUG; const post = (BLOG_POSTS || []).find(p => p.slug === slug); if (!post) { return (

Post não encontrado

); } const exam = (EXAMES || []).find(e => e.slug === post.examSlug); const others = (BLOG_POSTS || []).filter(p => p.slug !== post.slug).slice(0, 2); return (

{post.title}

Atualizado em {formatDate(post.date)} · Maxxi Saúde

{post.body.map((block, i) => { if (block.type === "h2") { return

{block.text}

; } if (block.type === "ul") { return (
    {block.items.map((it, j) =>
  • {it}
  • )}
); } return

{block.text}

; })}
{exam && (

{exam.name}

{exam.summary}

Ver detalhes do exame →
)}

Leia também

{others.map(p => ( {p.title} ))}
); } ReactDOM.createRoot(document.getElementById("root")).render();