mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 18:41:21 +00:00
Merge pull request #3154 from Infisical/misc/gov-banner-and-consent-reqs
misc: add instance banner and consent support
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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 />
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user