From ef22064bca8216e5d2fea38bf2dd445e4341d542 Mon Sep 17 00:00:00 2001 From: David Linhardt <76444188+MysterionAutotronic@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:38:48 +0200 Subject: [PATCH] add privacy policy and translate license text --- src/App.tsx | 9 +++++++++ src/components/ContentWrapper/Footer/Footer.css | 4 ---- src/components/ContentWrapper/Footer/Footer.scss | 4 ---- src/components/ContentWrapper/Footer/Footer.tsx | 9 +++++---- .../ContentWrapper/PrivacyPolicy/PrivacyPolicy.scss | 9 +++++++++ .../ContentWrapper/PrivacyPolicy/PrivacyPolicy.tsx | 12 ++++++++++++ src/i18n.ts | 8 ++++++++ src/locales/de/license.json | 3 +++ src/locales/de/privacyPolicy.json | 3 +++ src/locales/en/license.json | 3 +++ src/locales/en/privacyPolicy.json | 3 +++ 11 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.scss create mode 100644 src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.tsx create mode 100644 src/locales/de/license.json create mode 100644 src/locales/de/privacyPolicy.json create mode 100644 src/locales/en/license.json create mode 100644 src/locales/en/privacyPolicy.json diff --git a/src/App.tsx b/src/App.tsx index 4d8cb4c..5116398 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -19,6 +19,7 @@ import ContentWrapper from './components/ContentWrapper/ContentWrapper'; import AdminAuthWrapper from './components/AdminAuthWrapper/AdminAuthWrapper'; import LangProvider from './components/LangProvider/LangProvider'; import AuthProvider from './components/AuthProvider/AuthProvider'; +import PrivacyPolicy from './components/ContentWrapper/PrivacyPolicy/PrivacyPolicy'; /** * Root Component @@ -146,6 +147,14 @@ export default function App() { } /> + + + + } + /> diff --git a/src/components/ContentWrapper/Footer/Footer.css b/src/components/ContentWrapper/Footer/Footer.css index 2b588a5..7ca1c8c 100644 --- a/src/components/ContentWrapper/Footer/Footer.css +++ b/src/components/ContentWrapper/Footer/Footer.css @@ -25,8 +25,4 @@ .footer-link:hover { color: #06f87f; - } - - .datenschutzerklaerung { - display: none; } \ No newline at end of file diff --git a/src/components/ContentWrapper/Footer/Footer.scss b/src/components/ContentWrapper/Footer/Footer.scss index 228a682..9b14b1c 100644 --- a/src/components/ContentWrapper/Footer/Footer.scss +++ b/src/components/ContentWrapper/Footer/Footer.scss @@ -29,7 +29,3 @@ .footer-link:hover { color: $amplimind-accent-green; } - -.datenschutzerklaerung { - display: none; -} diff --git a/src/components/ContentWrapper/Footer/Footer.tsx b/src/components/ContentWrapper/Footer/Footer.tsx index ad11808..433a657 100644 --- a/src/components/ContentWrapper/Footer/Footer.tsx +++ b/src/components/ContentWrapper/Footer/Footer.tsx @@ -1,5 +1,6 @@ import './Footer.css'; import { useTranslation } from 'react-i18next'; +import { Link } from 'react-router-dom'; /** * Footer component that displays the footer of the application. @@ -34,11 +35,11 @@ export default function Footer() { > GitHub - - GitHub - + + {t('privacyPolicy', {ns: "privacyPolicy"})} + -

License Text

+

{t('licenseText', {ns: "license"})}

); } diff --git a/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.scss b/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.scss new file mode 100644 index 0000000..080a747 --- /dev/null +++ b/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.scss @@ -0,0 +1,9 @@ +@import '../../../theme/theme.scss'; + +.privacy-policy-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 20px; +} \ No newline at end of file diff --git a/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.tsx b/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.tsx new file mode 100644 index 0000000..b8a6941 --- /dev/null +++ b/src/components/ContentWrapper/PrivacyPolicy/PrivacyPolicy.tsx @@ -0,0 +1,12 @@ +import './PrivacyPolicy.css'; +import { useTranslation } from 'react-i18next'; + +export default function PrivacyPolicy() { + const { t } = useTranslation('privacyPolicy'); + return ( +
+

{t('privacyPolicy')}

+ your content here +
+ ); +} \ No newline at end of file diff --git a/src/i18n.ts b/src/i18n.ts index 046fff3..510ce54 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -10,6 +10,8 @@ import enInvite from './locales/en/invite.json'; import enResetPassword from './locales/en/resetPassword.json'; import enAdmin from './locales/en/admin.json'; import enPasswordStrength from './locales/en/passwordStrength.json'; +import enLicense from './locales/en/license.json'; +import enPrivacyPolicy from './locales/en/privacyPolicy.json'; // Deutsch / German import deMain from './locales/de/main.json'; @@ -19,6 +21,8 @@ import deInvite from './locales/de/invite.json'; import deResetPassword from './locales/de/resetPassword.json'; import deAdmin from './locales/de/admin.json'; import dePasswordStrength from './locales/de/passwordStrength.json'; +import deLicense from './locales/de/license.json'; +import dePrivacyPolicy from './locales/de/privacyPolicy.json'; const resources = { en: { @@ -29,6 +33,8 @@ const resources = { resetPassword: enResetPassword, admin: enAdmin, passwordStrength: enPasswordStrength, + license: enLicense, + privacyPolicy: enPrivacyPolicy, }, de: { main: deMain, @@ -38,6 +44,8 @@ const resources = { resetPassword: deResetPassword, admin: deAdmin, passwordStrength: dePasswordStrength, + license: deLicense, + privacyPolicy: dePrivacyPolicy, }, }; diff --git a/src/locales/de/license.json b/src/locales/de/license.json new file mode 100644 index 0000000..fe40b72 --- /dev/null +++ b/src/locales/de/license.json @@ -0,0 +1,3 @@ +{ + "licenseText": "Lizenztext" +} \ No newline at end of file diff --git a/src/locales/de/privacyPolicy.json b/src/locales/de/privacyPolicy.json new file mode 100644 index 0000000..e395df5 --- /dev/null +++ b/src/locales/de/privacyPolicy.json @@ -0,0 +1,3 @@ +{ + "privacyPolicy": "Datenschutzerklärung" +} \ No newline at end of file diff --git a/src/locales/en/license.json b/src/locales/en/license.json new file mode 100644 index 0000000..16baef4 --- /dev/null +++ b/src/locales/en/license.json @@ -0,0 +1,3 @@ +{ + "licenseText": "License Text" +} \ No newline at end of file diff --git a/src/locales/en/privacyPolicy.json b/src/locales/en/privacyPolicy.json new file mode 100644 index 0000000..79d4f69 --- /dev/null +++ b/src/locales/en/privacyPolicy.json @@ -0,0 +1,3 @@ +{ + "privacyPolicy": "Privacy Policy" +} \ No newline at end of file