From c884171a5cdefcb9fef7c2bc1fee7cfab32bae09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fede=20=C3=81lvarez?= Date: Tue, 28 Jun 2022 16:38:13 +0200 Subject: [PATCH] Footer to CMS --- src/components/common/footer/index.tsx | 56 +++++++++++++++++++------- src/components/layout/page.tsx | 8 +++- src/lib/cms/queries/footer.js | 14 +++++++ src/pages/404.tsx | 18 ++++++++- src/pages/_app.tsx | 8 ++-- src/pages/about.tsx | 30 +++++++++----- src/pages/blog/[slug].tsx | 12 ++++-- src/pages/blog/index.tsx | 9 ++++- src/pages/careers.tsx | 30 +++++++++----- src/pages/community.tsx | 21 +++++----- src/pages/contact.tsx | 14 ++++--- src/pages/index.tsx | 30 +++++++++----- src/pages/partners.tsx | 30 +++++++++----- src/pages/press.tsx | 13 ++++-- src/pages/privacy-policy.tsx | 14 +++++-- src/pages/products.tsx | 33 ++++++++++----- src/pages/terms-of-use.tsx | 14 +++++-- 17 files changed, 250 insertions(+), 104 deletions(-) create mode 100644 src/lib/cms/queries/footer.js diff --git a/src/components/common/footer/index.tsx b/src/components/common/footer/index.tsx index 687e247..5ac9473 100644 --- a/src/components/common/footer/index.tsx +++ b/src/components/common/footer/index.tsx @@ -6,6 +6,16 @@ import MailchimpSubscribe from 'react-mailchimp-subscribe' import { ArrowLink } from '~/components/icons/arrow' import { Isotype, LogoFooter } from '~/components/icons/logo' +import { + Discord, + Discourse, + Facebook, + Instagram, + Linkedin, + Reddit, + Telegram, + Twitter +} from '~/components/icons/socials' import { Container } from '~/components/layout/container' import Section from '~/components/layout/section' import Heading from '~/components/primitives/heading' @@ -13,12 +23,6 @@ import Link from '~/components/primitives/link' import Switch from '~/components/primitives/switch' import { useIsomorphicLayoutEffect } from '~/hooks/use-isomorphic-layout-effect' -import { - AboutLinks, - ConnectLinks, - DevelopersLinks, - ProductsLinks -} from './footer' import s from './footer.module.scss' type FormProps = { @@ -81,7 +85,17 @@ const SimpleForm = ({ ) } -export const Footer = () => { +interface Props { + data: { + aboutLinks: { href: string; title: string }[] + communityLinks: { href: string; title: string }[] + connectLinks: { href: string; title: string }[] + developerLinks: { href: string; title: string }[] + productsLinks: { href: string; title: string }[] + } +} + +export const Footer = ({ data }: Props) => { const { theme, setTheme } = useTheme() const router = useRouter() @@ -190,7 +204,7 @@ export const Footer = () => {