diff --git a/packages/app/.prettierrc.json b/packages/app/.prettierrc.json index f7e7dde5e..ef894e231 100644 --- a/packages/app/.prettierrc.json +++ b/packages/app/.prettierrc.json @@ -1,8 +1,16 @@ { "trailingComma": "es5", - "semi": false, + "semi": true, "singleQuote": true, - "printWidth": 70, - "bracketSameLine": true, - "plugins": ["prettier-plugin-tailwindcss"] + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "endOfLine": "lf", + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css" } diff --git a/packages/app/app/(legal)/data-request/components/createRequest.tsx b/packages/app/app/(legal)/data-request/components/createRequest.tsx new file mode 100644 index 000000000..b02b5cf95 --- /dev/null +++ b/packages/app/app/(legal)/data-request/components/createRequest.tsx @@ -0,0 +1,58 @@ +'use client'; +import { CardContent } from '@/components/ui/card'; +import { useAccount } from 'wagmi'; +import { Button } from '@/components/ui/button'; +import { LuMail } from 'react-icons/lu'; + +const CreateRequest = () => { + const { address } = useAccount(); + + const handleEmailClick = () => { + const subject = encodeURIComponent('Request for Personal Data'); + const body = encodeURIComponent(`Dear StreamETH Support, + +I would like to request all my personal data saved by StreamETH. + +My login address is: ${address || 'Unknown'} + +Please provide me with the following information: + +[Please specify what personal data you are requesting] + +Thank you for your assistance. + +Best regards, +[Your Name]`); + + window.location.href = `mailto:support@streameth.org?subject=${subject}&body=${body}`; + }; + + return ( + +

Request Your Personal Data

+

+ Please click the button below to email support@streameth.org with your + request: +

+ +

+ We will send an email confirmation that we received your request. We + will then follow up with a zip file containing all your personal data + saved on StreamETH. +

+ + +
+ ); +}; + +export default CreateRequest; diff --git a/packages/app/app/(legal)/data-request/page.tsx b/packages/app/app/(legal)/data-request/page.tsx new file mode 100644 index 000000000..9fbe0e96f --- /dev/null +++ b/packages/app/app/(legal)/data-request/page.tsx @@ -0,0 +1,38 @@ +'use server'; + +import { Card, CardTitle, CardFooter } from '@/components/ui/card'; +import Image from 'next/image'; +import Footer from '@/components/Layout/Footer'; +import AuthorizationMessage from '@/components/authorization/AuthorizationMessage'; +import CheckAuthorization from '@/components/authorization/CheckAuthorization'; +import CreateRequest from './components/createRequest'; + +const DataRequest = async () => { + const year = new Date().getFullYear(); + + const isAuthorized = await CheckAuthorization(); + if (!isAuthorized) { + return ; + } + + return ( +
+
+ + + {'StreamETH + + + +
+
+
+ ); +}; + +export default DataRequest; diff --git a/packages/app/app/(legal)/privacy/page.tsx b/packages/app/app/(legal)/privacy/page.tsx index dde6c4ce3..515f53431 100644 --- a/packages/app/app/(legal)/privacy/page.tsx +++ b/packages/app/app/(legal)/privacy/page.tsx @@ -1,16 +1,16 @@ -import { Card, CardTitle, CardFooter } from '@/components/ui/card' -import { promises as fs } from 'fs' -import Image from 'next/image' -import Footer from '@/components/Layout/Footer' -import Markdown from 'react-markdown' -import remarkGfm from 'remark-gfm' +import { Card, CardTitle, CardFooter } from '@/components/ui/card'; +import { promises as fs } from 'fs'; +import Image from 'next/image'; +import Footer from '@/components/Layout/Footer'; +import Markdown from 'react-markdown'; +import remarkGfm from 'remark-gfm'; -const Terms = async () => { - const year = new Date().getFullYear() +const Privacy = async () => { + const year = new Date().getFullYear(); const file = await fs.readFile( process.cwd() + '/public/legal/privacy.md', 'utf8' - ) + ); return (
@@ -27,18 +27,17 @@ const Terms = async () => { + className="prose prose-sm my-5 max-w-full p-4" + > {file}
- - © {year} StreamETH International B.V. - + © {year} StreamETH International B.V.