* Addconfig entries for legal notice * Add legal route handling to middleware * Make legal notice public * Add legal category to config sidebar * Add legal notice page * Add German translations for legal notice and configuration options * Replace legal page with separate imprint and privacy pages * Update middleware * Add footer component * Update legal text descriptions to indicate Markdown support again * Refactor footer layout * Add zIndex to footer component * improve mobile layout * run formatter --------- Co-authored-by: Elias Schneider <login@eliasschneider.com>
56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
import { Anchor, Title, useMantineTheme } from "@mantine/core";
|
|
import Meta from "../../components/Meta";
|
|
import useTranslate from "../../hooks/useTranslate.hook";
|
|
import { FormattedMessage } from "react-intl";
|
|
import useConfig from "../../hooks/config.hook";
|
|
import Markdown from "markdown-to-jsx";
|
|
|
|
const PrivacyPolicy = () => {
|
|
const t = useTranslate();
|
|
const { colorScheme } = useMantineTheme();
|
|
const config = useConfig();
|
|
return (
|
|
<>
|
|
<Meta title={t("privacy.title")} />
|
|
<Title mb={30} order={1}>
|
|
<FormattedMessage id="privacy.title" />
|
|
</Title>
|
|
<Markdown
|
|
options={{
|
|
forceBlock: true,
|
|
overrides: {
|
|
pre: {
|
|
props: {
|
|
style: {
|
|
backgroundColor:
|
|
colorScheme == "dark"
|
|
? "rgba(50, 50, 50, 0.5)"
|
|
: "rgba(220, 220, 220, 0.5)",
|
|
padding: "0.75em",
|
|
whiteSpace: "pre-wrap",
|
|
},
|
|
},
|
|
},
|
|
table: {
|
|
props: {
|
|
className: "md",
|
|
},
|
|
},
|
|
a: {
|
|
props: {
|
|
target: "_blank",
|
|
rel: "noreferrer",
|
|
},
|
|
component: Anchor,
|
|
},
|
|
},
|
|
}}
|
|
>
|
|
{config.get("legal.privacyPolicyText")}
|
|
</Markdown>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default PrivacyPolicy;
|