From 7b02e397e03b1a244bf48809f26b833882cc3e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fede=20=C3=81lvarez?= <78366796+fedealvarezcampos@users.noreply.github.com> Date: Wed, 6 Apr 2022 02:10:52 +0200 Subject: [PATCH] Terms of use & Privacy pages (#16) --- src/components/common/footer/index.tsx | 84 +++++++++++-------- .../sections/privacy/hero/hero.module.scss | 60 +++++++++++++ .../sections/privacy/hero/index.tsx | 18 ++++ .../sections/privacy/privacypolicy/index.tsx | 34 ++++++++ .../privacy/privacypolicy/privacypolicy.ts | 21 +++++ .../sections/terms/hero/hero.module.scss | 60 +++++++++++++ src/components/sections/terms/hero/index.tsx | 18 ++++ .../sections/terms/termsofuse/index.tsx | 34 ++++++++ .../terms/termsofuse/termsofuse.module.scss | 54 ++++++++++++ .../sections/terms/termsofuse/termsofuse.ts | 21 +++++ src/pages/privacy-policy.tsx | 20 +++++ src/pages/terms-of-use.tsx | 20 +++++ 12 files changed, 410 insertions(+), 34 deletions(-) create mode 100644 src/components/sections/privacy/hero/hero.module.scss create mode 100644 src/components/sections/privacy/hero/index.tsx create mode 100644 src/components/sections/privacy/privacypolicy/index.tsx create mode 100644 src/components/sections/privacy/privacypolicy/privacypolicy.ts create mode 100644 src/components/sections/terms/hero/hero.module.scss create mode 100644 src/components/sections/terms/hero/index.tsx create mode 100644 src/components/sections/terms/termsofuse/index.tsx create mode 100644 src/components/sections/terms/termsofuse/termsofuse.module.scss create mode 100644 src/components/sections/terms/termsofuse/termsofuse.ts create mode 100644 src/pages/privacy-policy.tsx create mode 100644 src/pages/terms-of-use.tsx diff --git a/src/components/common/footer/index.tsx b/src/components/common/footer/index.tsx index d8d9f3a..3684b6c 100644 --- a/src/components/common/footer/index.tsx +++ b/src/components/common/footer/index.tsx @@ -1,4 +1,6 @@ import clsx from 'clsx' +import { useRouter } from 'next/router' +import { useEffect, useState } from 'react' import { ArrowLink } from '~/components/icons/arrow' import Line from '~/components/icons/line' @@ -18,43 +20,57 @@ import { import s from './footer.module.scss' export const Footer = () => { + const [show, setShow] = useState(true) + const router = useRouter() + + useEffect(() => { + if ( + router?.pathname === '/terms-of-use' || + router?.pathname === '/privacy-policy' + ) { + setShow(false) + } + }, [router?.pathname]) + return ( <> -
- - - - - + + -
- - -
-
-
+ + + + + + Sign-up to our
Newsletter +
+
+ + +
+
+ + )}