misc: add instance banner and consent support

This commit is contained in:
Sheen Capadngan
2025-02-26 23:58:45 +09:00
parent f4bd48fd1d
commit ce4c5d8ea1
12 changed files with 222 additions and 18 deletions
@@ -0,0 +1,17 @@
/* eslint-disable react/no-danger */
import DOMPurify from "dompurify";
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">
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(config.pageFrameContent) }} />
</div>
) : (
<div />
);
};