diff --git a/packages/dapp/src/app/[locale]/(public)/privacy-mobile/page.tsx b/packages/dapp/src/app/[locale]/(public)/privacy-mobile/page.tsx
new file mode 100644
index 000000000..309748f59
--- /dev/null
+++ b/packages/dapp/src/app/[locale]/(public)/privacy-mobile/page.tsx
@@ -0,0 +1,55 @@
+import DOMPurify from 'dompurify';
+import { JSDOM } from 'jsdom';
+import { marked } from 'marked';
+
+const getMobilePrivacyPolicy = async () => {
+ const renderer = {
+ heading(text: string, level: number) {
+ switch (level) {
+ case 1:
+ return `
+
${text}
${text}
`; + }, + link(href: string, title: string | null | undefined, text: string) { + return `${text}`; + }, + }; + + marked.use({ renderer }); + const markdown = await ( + await fetch( + 'https://raw.githubusercontent.com/lutralabs/documents/main/mobile-privacy-policy.md', + { cache: 'no-store' } + ) + ).text(); + const { window } = new JSDOM(''); + const purify = DOMPurify(window); + const html = purify.sanitize(await marked.parse(markdown)); + return html; +}; + +export default async function Page() { + const pp = await getMobilePrivacyPolicy(); + return ( + + ); +} diff --git a/packages/dapp/src/components/PublicFooter/index.tsx b/packages/dapp/src/components/PublicFooter/index.tsx index c1a0cbe86..522b06bcd 100644 --- a/packages/dapp/src/components/PublicFooter/index.tsx +++ b/packages/dapp/src/components/PublicFooter/index.tsx @@ -22,6 +22,16 @@ export default function PublicFooter({ setIsMenuOpen }: PublicFooterProps) { > Privacy Policy + { + if (setIsMenuOpen) { + setIsMenuOpen(false); + } + }} + > + Mobile Privacy Policy + {