From 4c029ca8e546bc867c298154f36748b6a3299775 Mon Sep 17 00:00:00 2001 From: John McBride Date: Fri, 9 Aug 2024 10:55:36 -0600 Subject: [PATCH] fix: Use button for Ghost.io newsletter signup (#337) Signed-off-by: John McBride --- components/sections/home-page/Newsletter.tsx | 43 ++----- .../sections/maintainers/Newsletter.tsx | 68 ---------- pages/maintainers/index.tsx | 116 +++++++++--------- 3 files changed, 68 insertions(+), 159 deletions(-) delete mode 100644 components/sections/maintainers/Newsletter.tsx diff --git a/components/sections/home-page/Newsletter.tsx b/components/sections/home-page/Newsletter.tsx index 8252bd60e..3e84d2fb4 100644 --- a/components/sections/home-page/Newsletter.tsx +++ b/components/sections/home-page/Newsletter.tsx @@ -21,48 +21,25 @@ const Newsletter = () => { Doodles -
- $orange-to-yellowThe fast track$orange-to-yellow to open source + $orange-to-yellowThe fast track$orange-to-yellow to open source - - Stay up to date with the latest OpenSauced news and trends. + Stay up to date with the latest OpenSauced news and trends. - -
- - - -
+ Subscribe +
) } - -export default Newsletter \ No newline at end of file +export default Newsletter diff --git a/components/sections/maintainers/Newsletter.tsx b/components/sections/maintainers/Newsletter.tsx deleted file mode 100644 index 8252bd60e..000000000 --- a/components/sections/maintainers/Newsletter.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react' -import Image from 'next/image' - -// Components -import SectionWrapper from '../../common/layout/SectionWrapper' -import { Heading, Typography } from '../../common/text' -import GradientBorderWrapper from '../../common/GradientBorderWrapper' - -// Static assets -import StrokeR3 from '../../../public/background-strokes/_3_rightStroke.svg' -import StrokeL3 from '../../../public/background-strokes/_3_leftStroke.svg' - -const Newsletter = () => { - return ( - -
-
- Doodles -
-
- Doodles -
-
- -
- - $orange-to-yellowThe fast track$orange-to-yellow to open source - - - - Stay up to date with the latest OpenSauced news and trends. - - - -
- - - -
-
-
-
- ) -} - -export default Newsletter \ No newline at end of file diff --git a/pages/maintainers/index.tsx b/pages/maintainers/index.tsx index 6e9254005..18d0da62a 100644 --- a/pages/maintainers/index.tsx +++ b/pages/maintainers/index.tsx @@ -1,86 +1,86 @@ import type { NextPage } from 'next' import { - getAllBlogs, - getCommonData, - getFeaturedBlogs, - getMaintainersPageData + getAllBlogs, + getCommonData, + getFeaturedBlogs, + getMaintainersPageData } from '../../lib/sanity' import { - Blog as SanityBlog, - Footer as SanityFooter, - MaintainersPage as SanityMaintainersPage, - Navigation as SanityNavigation, - Seo as SanitySeo, - User as SanityUser, + Blog as SanityBlog, + Footer as SanityFooter, + MaintainersPage as SanityMaintainersPage, + Navigation as SanityNavigation, + Seo as SanitySeo, + User as SanityUser, } from '../../sanity.types' import Hero from '../../components/sections/home-page/Hero' import Logos from '../../components/sections/home-page/Logos' import Background from '../../components/sections/maintainers/Background' import Blogs from '../../components/sections/maintainers/blogs/Blogs' import PageLayout from '../../components/common/layout/PageLayout' -import Newsletter from '../../components/sections/maintainers/Newsletter' +import Newsletter from '../../components/sections/home-page/Newsletter' import TeamsFeatures from '../../components/sections/home-page/features/TeamsFeatures' import CTA from '../../components/sections/teams/CTA' interface MaintainersPageProps { - data: { - commonData: { - navigationLinks: SanityNavigation[] - seoData: SanitySeo - footer: SanityFooter[] + data: { + commonData: { + navigationLinks: SanityNavigation[] + seoData: SanitySeo + footer: SanityFooter[] + } + maintainersPageData: SanityMaintainersPage + blogs: SanityBlog[] + featuredBlogs: SanityBlog[] } - maintainersPageData: SanityMaintainersPage - blogs: SanityBlog[] - featuredBlogs: SanityBlog[] - } } const MaintainersPage: NextPage = ({ - data: { commonData, maintainersPageData, blogs, featuredBlogs }, + data: { commonData, maintainersPageData, blogs, featuredBlogs }, }) => { - const displayBlogs = [...blogs, ...featuredBlogs].sort( - (a, b) => +new Date(b._createdAt) - +new Date(a._createdAt) - ) + const displayBlogs = [...blogs, ...featuredBlogs].sort( + (a, b) => +new Date(b._createdAt) - +new Date(a._createdAt) + ) - return ( - - - - - - - - - ) + return ( + + + + + + + + + ) } export default MaintainersPage export async function getStaticProps() { - const [commonData, maintainersPageData, featuredBlogs, blogs] = await Promise.all([ - getCommonData(), - getMaintainersPageData(), - getFeaturedBlogs(), - getAllBlogs(), - ]) + const [commonData, maintainersPageData, featuredBlogs, blogs] = await Promise.all([ + getCommonData(), + getMaintainersPageData(), + getFeaturedBlogs(), + getAllBlogs(), + ]) - const data = { commonData, maintainersPageData, featuredBlogs, blogs } + const data = { commonData, maintainersPageData, featuredBlogs, blogs } - return { - props: { - data, - }, - revalidate: 30, - } + return { + props: { + data, + }, + revalidate: 30, + } }