diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index 4f707f1..64e2189 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -9,7 +9,8 @@ "react/display-name": "off", "react-hooks/exhaustive-deps": "off", "space-infix-ops": "warn", - "comma-spacing": "warn" + "comma-spacing": "warn", + "react-hooks/rules-of-hooks": "off" }, "overrides": [ { diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 8b8d9a7..95760f6 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,6 +1,7 @@ import { Metadata } from 'next' import Egg from '/src/components/Egg/Egg' +import Footer from '/src/components/Footer/Footer' import Settings from '/src/components/Settings/Settings' import TranslateDialog from '/src/components/TranslateDialog/TranslateDialog' import { fallbackLng } from '/src/i18n/options' @@ -10,7 +11,10 @@ import './global.css' export const metadata: Metadata = { metadataBase: new URL('https://crab.fit'), - title: 'Crab Fit', + title: { + absolute: 'Crab Fit', + template: '%s - Crab Fit', + }, keywords: ['crab', 'fit', 'crabfit', 'schedule', 'availability', 'availabilities', 'when2meet', 'doodle', 'meet', 'plan', 'time', 'timezone'], description: 'Enter your availability to find a time that works for everyone!', themeColor: '#F79E00', @@ -32,9 +36,13 @@ const RootLayout = async ({ children }: { children: React.ReactNode }) => { return
{t('about.content.p5')}
- - {/* @ts-expect-error Async Server Component */} - > } diff --git a/frontend/src/app/privacy/GoogleTranslate.tsx b/frontend/src/app/privacy/GoogleTranslate.tsx new file mode 100644 index 0000000..57f28c5 --- /dev/null +++ b/frontend/src/app/privacy/GoogleTranslate.tsx @@ -0,0 +1,29 @@ +'use client' + +import { useEffect, useState } from 'react' + +const TRANSLATION_DISCLAIMER = 'While the translated document is provided for your convenience, the English version as displayed at https://crab.fit is legally binding.' + +interface GoogleTranslateProps { + children: React.ReactNode + language: string +} + +// Show a link to translate the privacy policy to the user's preferred language +const GoogleTranslate = ({ language, children }: GoogleTranslateProps) => { + const [content, setContent] = useState+ {children} +
: null +} + +export default GoogleTranslate diff --git a/frontend/src/pages-old/Privacy/Privacy.styles.js b/frontend/src/app/privacy/page.module.scss similarity index 61% rename from frontend/src/pages-old/Privacy/Privacy.styles.js rename to frontend/src/app/privacy/page.module.scss index 8766f4a..1bf16fb 100644 --- a/frontend/src/pages-old/Privacy/Privacy.styles.js +++ b/frontend/src/app/privacy/page.module.scss @@ -1,6 +1,4 @@ -import { styled } from 'goober' - -export const Note = styled('p')` +.note { background-color: var(--surface); border: 1px solid var(--primary); border-radius: 10px; @@ -13,10 +11,4 @@ export const Note = styled('p')` & a { color: var(--secondary); } -` - -export const ButtonArea = styled('div')` - @media print { - display: none; - } -` +} diff --git a/frontend/src/pages-old/Privacy/Privacy.jsx b/frontend/src/app/privacy/page.tsx similarity index 67% rename from frontend/src/pages-old/Privacy/Privacy.jsx rename to frontend/src/app/privacy/page.tsx index 1852903..653a72e 100644 --- a/frontend/src/pages-old/Privacy/Privacy.jsx +++ b/frontend/src/app/privacy/page.tsx @@ -1,46 +1,37 @@ -import { useState, useEffect, useRef } from 'react' -import { useNavigate } from 'react-router-dom' -import { useTranslation } from 'react-i18next' +import { Metadata } from 'next' -import { Button, Center, Footer, Logo } from '/src/components' +import GoogleTranslate from '/src/app/privacy/GoogleTranslate' +import Button from '/src/components/Button/Button' +import Content from '/src/components/Content/Content' +import Header from '/src/components/Header/Header' +import { P, Ul } from '/src/components/Paragraph/Text' +import Section from '/src/components/Section/Section' +import { useTranslation } from '/src/i18n/server' -import { StyledMain, AboutSection, P } from '../Home/Home.styles' -import { Note, ButtonArea } from './Privacy.styles' +import styles from './page.module.scss' -const translationDisclaimer = 'While the translated document is provided for your convenience, the English version as displayed at https://crab.fit is legally binding.' +export const generateMetadata = async (): PromiseThis SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.
This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.
If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.
@@ -48,9 +39,9 @@ const Privacy = () => {The Service uses third party services that may collect information used to identify you.
Links to privacy policies of the third party service providers used by the Service:
-+
When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.
@@ -61,17 +52,17 @@ const Privacy = () => {Third-party companies may be employed for the following reasons:
-+
To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.
Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.
-Events that are created will be automatically permanently erased from storage after 3 months of inactivity.
The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.
@@ -86,18 +77,14 @@ const Privacy = () => {If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at contact@crab.fit.