mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 09:27:50 +00:00
21 lines
548 B
TypeScript
21 lines
548 B
TypeScript
import ReactMarkdown from "react-markdown";
|
|
import DOMPurify from "dompurify";
|
|
import rehypeRaw from "rehype-raw";
|
|
|
|
import { useServerConfig } from "@app/context";
|
|
|
|
export const Banner = () => {
|
|
const { config } = useServerConfig();
|
|
|
|
// eslint-disable-next-line react/no-danger-with-children
|
|
return config.pageFrameContent ? (
|
|
<div className="h-[3vh] w-full text-center">
|
|
<ReactMarkdown rehypePlugins={[rehypeRaw]}>
|
|
{DOMPurify.sanitize(config.pageFrameContent)}
|
|
</ReactMarkdown>
|
|
</div>
|
|
) : (
|
|
<div />
|
|
);
|
|
};
|