misc: addressed comments

This commit is contained in:
Sheen Capadngan
2025-03-03 23:55:11 +08:00
parent ce4c5d8ea1
commit 9989ceb6d1
7 changed files with 1840 additions and 54 deletions
@@ -1,5 +1,6 @@
/* eslint-disable react/no-danger */
import ReactMarkdown from "react-markdown";
import DOMPurify from "dompurify";
import rehypeRaw from "rehype-raw";
import { useServerConfig } from "@app/context";
@@ -9,7 +10,9 @@ export const Banner = () => {
// eslint-disable-next-line react/no-danger-with-children
return config.pageFrameContent ? (
<div className="h-[3vh] w-full text-center">
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(config.pageFrameContent) }} />
<ReactMarkdown rehypePlugins={[rehypeRaw]}>
{DOMPurify.sanitize(config.pageFrameContent)}
</ReactMarkdown>
</div>
) : (
<div />