39 lines
1.3 KiB
TypeScript
Raw Normal View History

2025-02-13 23:04:40 +01:00
import fs from "fs"
import path from "path"
2025-02-14 18:11:45 +01:00
2025-02-13 23:04:40 +01:00
async function getChangelog() {
2025-02-14 17:31:44 +01:00
const changelogPath = path.join(process.cwd(), "..", "CHANGELOG.md")
2025-02-14 17:54:52 +01:00
try {
const fileContents = fs.readFileSync(changelogPath, "utf8")
2025-02-14 19:21:23 +01:00
2025-02-14 19:31:58 +01:00
// Asegurar que el contenido HTML no tiene espacios innecesarios
2025-02-14 19:21:23 +01:00
return fileContents.trim()
2025-02-14 17:54:52 +01:00
} catch (error) {
console.error("Error reading changelog file:", error)
2025-02-14 19:09:50 +01:00
return "<p>Changelog content not found.</p>"
2025-02-14 17:54:52 +01:00
}
2025-02-13 23:04:40 +01:00
}
export default async function ChangelogPage() {
const changelogContent = await getChangelog()
2025-02-14 12:24:18 +01:00
return (
2025-02-14 18:21:58 +01:00
<div className="bg-white text-gray-900 min-h-screen">
2025-02-14 17:54:52 +01:00
<div className="container mx-auto px-4 py-16 max-w-4xl">
<h1 className="text-4xl font-bold mb-8">Changelog</h1>
2025-02-14 19:31:58 +01:00
{/* Eliminamos el recuadro, bordes y cualquier estilo que fuerce texto plano */}
2025-02-14 19:09:50 +01:00
<div
2025-02-14 19:31:58 +01:00
className="max-w-none"
style={{
whiteSpace: "normal", // Asegura que el HTML se renderice correctamente
backgroundColor: "transparent", // Elimina cualquier fondo gris
border: "none", // Elimina el borde del recuadro
padding: "0", // Evita cualquier padding adicional
}}
dangerouslySetInnerHTML={{ __html: changelogContent }} // Renderiza HTML puro
2025-02-14 19:09:50 +01:00
/>
2025-02-14 17:54:52 +01:00
</div>
2025-02-13 23:04:40 +01:00
</div>
)
2025-02-14 17:09:21 +01:00
}