From 877c4b3479a3799ad14c36c59834c7cfabcc2252 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Wed, 24 May 2023 22:17:08 +1000 Subject: [PATCH] Migrate privacy policy to Nextjs --- frontend/.eslintrc.json | 3 +- frontend/src/app/layout.tsx | 12 ++- frontend/src/app/page.tsx | 6 +- frontend/src/app/privacy/GoogleTranslate.tsx | 29 +++++++ .../privacy/page.module.scss} | 12 +-- .../Privacy.jsx => app/privacy/page.tsx} | 81 ++++++++----------- .../components/Content/Content.module.scss | 6 ++ frontend/src/components/Content/Content.tsx | 7 +- .../src/components/Paragraph/Paragraph.tsx | 10 --- ...Paragraph.module.scss => Text.module.scss} | 2 +- frontend/src/components/Paragraph/Text.tsx | 11 +++ .../components/Section/Section.module.scss | 4 - 12 files changed, 101 insertions(+), 82 deletions(-) create mode 100644 frontend/src/app/privacy/GoogleTranslate.tsx rename frontend/src/{pages-old/Privacy/Privacy.styles.js => app/privacy/page.module.scss} (61%) rename frontend/src/{pages-old/Privacy/Privacy.jsx => app/privacy/page.tsx} (67%) delete mode 100644 frontend/src/components/Paragraph/Paragraph.tsx rename frontend/src/components/Paragraph/{Paragraph.module.scss => Text.module.scss} (84%) create mode 100644 frontend/src/components/Paragraph/Text.tsx 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 - {children} + + {children} + + {/* @ts-expect-error Async Server Component */} +