diff --git a/src/pages/Program.jsx b/src/pages/Program.jsx index 0ed75f89ddd63fbb5c964800c30c76b386152209..40b8f4d28b962511b303adf6fd23a8f94c4de798 100644 --- a/src/pages/Program.jsx +++ b/src/pages/Program.jsx @@ -8,6 +8,7 @@ import Button from "components/Button"; import Chip from "components/Chip"; import ModalConfirm from "components/modals/ModalConfirm"; import { useActionState, useItemActionConfirm } from "hooks"; +import { markdownConverter } from "markdown"; import { AuthStore, ProgramStore } from "stores"; const Schedule = () => { @@ -49,6 +50,11 @@ const Schedule = () => { const isCurrent = id === currentId; const entry = items[id]; const fullTitle = `${entry.number}. ${entry.title}`; + const htmlContent = !!entry.description + ? { + __html: markdownConverter.makeHtml(entry.description), + } + : null; return ( <div className="flex flex-col md:flex-row my-4 duration-300 text-black" @@ -78,10 +84,11 @@ const Schedule = () => { <strong>Navrhovatel:</strong> <span>{entry.proposer}</span> </div> - {entry.description && ( - <p className="mt-2 leading-tight max-w-3xl"> - {entry.description} - </p> + {htmlContent && ( + <div + className="mt-2 leading-tight max-w-3xl content-block" + dangerouslySetInnerHTML={htmlContent} + /> )} {isAuthenticated && user.role === "chairman" &&