From 57d330a37b7ace0a9b8dd514bbac4bc8d8e816d8 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 8 Aug 2024 15:14:44 -0400 Subject: [PATCH] chore: fixed eslint issue --- components/sections/home-page/Newsletter.tsx | 62 ++++----- pages/maintainers/index.tsx | 126 ++++++++++--------- 2 files changed, 101 insertions(+), 87 deletions(-) diff --git a/components/sections/home-page/Newsletter.tsx b/components/sections/home-page/Newsletter.tsx index a8c61c6d6..2f4ef81f8 100644 --- a/components/sections/home-page/Newsletter.tsx +++ b/components/sections/home-page/Newsletter.tsx @@ -11,37 +11,37 @@ import StrokeR3 from '../../../public/background-strokes/_3_rightStroke.svg' import StrokeL3 from '../../../public/background-strokes/_3_leftStroke.svg' const Newsletter = () => { - const handleSubscribeClick = () => { - window.open("https://news.opensauced.pizza/#/portal/signup", "_blank"); - }; + const handleSubscribeClick = () => { + window.open('https://news.opensauced.pizza/#/portal/signup', '_blank') + } - 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. - - - - -
-
- ) + 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 diff --git a/pages/maintainers/index.tsx b/pages/maintainers/index.tsx index 18d0da62a..30f7608d0 100644 --- a/pages/maintainers/index.tsx +++ b/pages/maintainers/index.tsx @@ -1,17 +1,17 @@ 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' @@ -23,64 +23,78 @@ import TeamsFeatures from '../../components/sections/home-page/features/TeamsFea import CTA from '../../components/sections/teams/CTA' interface MaintainersPageProps { - data: { - commonData: { - navigationLinks: SanityNavigation[] - seoData: SanitySeo - footer: SanityFooter[] - } - maintainersPageData: SanityMaintainersPage - blogs: SanityBlog[] - featuredBlogs: SanityBlog[] + data: { + commonData: { + navigationLinks: SanityNavigation[] + seoData: SanitySeo + footer: SanityFooter[] } + 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, + } }