From f0b88698b73a60b8fda162f633e6df02e6ee5912 Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Thu, 26 Dec 2024 09:13:41 -0500 Subject: [PATCH] lint fixes --- src/components/templates/andIntl.tsx | 2 +- src/components/templates/andMiniplayer.spec.tsx | 1 - src/containers/account/register.tsx | 2 +- src/containers/bible/book.tsx | 1 - src/containers/bible/index.tsx | 14 ++++++++++---- src/containers/collection/presenter.tsx | 1 - src/containers/playlist/item.tsx | 2 +- src/containers/presenter/recordings.tsx | 2 +- src/containers/sermon/list.tsx | 2 +- src/containers/song/books/track.tsx | 2 +- src/containers/sponsor/detail.tsx | 2 +- src/containers/sponsor/teachings.tsx | 2 +- src/lib/getBibleStaticProps.ts | 2 ++ 13 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/components/templates/andIntl.tsx b/src/components/templates/andIntl.tsx index 8b03d149d..220a152df 100644 --- a/src/components/templates/andIntl.tsx +++ b/src/components/templates/andIntl.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { IntlProvider } from 'react-intl'; import handleIntlError from '~lib/handleIntlError'; -import useLanguageRoute from '~lib/useLanguageRoute'; +import useLanguageRoute from '~lib/hooks/useLanguageRoute'; import useIntlMessages from '~src/lib/useIntlMessages'; function AndIntl({ children }: { children: React.ReactNode }) { diff --git a/src/components/templates/andMiniplayer.spec.tsx b/src/components/templates/andMiniplayer.spec.tsx index 7deadefba..5a66cd82e 100644 --- a/src/components/templates/andMiniplayer.spec.tsx +++ b/src/components/templates/andMiniplayer.spec.tsx @@ -63,7 +63,6 @@ describe('miniplayer template', () => { canonicalPath: 'the_recording_path', recordingContentType: RecordingContentType.Sermon, duration: 60, - recordingContentType: RecordingContentType.Sermon, speakers: [], sequence: { id: 'the_sequence_id', diff --git a/src/containers/account/register.tsx b/src/containers/account/register.tsx index e0f4bb1d2..1184b13ea 100644 --- a/src/containers/account/register.tsx +++ b/src/containers/account/register.tsx @@ -5,8 +5,8 @@ import SocialLogin from '~components/molecules/socialLogin'; import RegisterForm from '~components/organisms/registerForm'; import AndOnboarding from '~components/templates/andOnboarding'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndAuthGuard from '~src/components/templates/andAuthGuard'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import LoginRedirect from './loginRedirect'; diff --git a/src/containers/bible/book.tsx b/src/containers/bible/book.tsx index 78f0082d3..8d62533cb 100644 --- a/src/containers/bible/book.tsx +++ b/src/containers/bible/book.tsx @@ -149,7 +149,6 @@ function BookInner({ )}`, sequence: null, collection: null, - recordingContentType: RecordingContentType.BibleChapter, sponsor: { title: 'Faith Comes By Hearing', }, diff --git a/src/containers/bible/index.tsx b/src/containers/bible/index.tsx index 773c5c686..006a2bc71 100644 --- a/src/containers/bible/index.tsx +++ b/src/containers/bible/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import withFailStates from '~src/components/HOCs/withFailStates'; import Tease from '~src/components/molecules/tease'; import PassageNavigation, { Version, } from '~src/components/organisms/passageNavigation'; +import AndFailStates from '~src/components/templates/andFailStates'; export interface BibleIndexProps { data: Array; @@ -18,6 +18,12 @@ function Bible({ data }: BibleIndexProps): JSX.Element { ); } -export default withFailStates(Bible, { - useShould404: ({ data }) => !data.length, -}); +const WithFailStates = (props: BibleIndexProps) => ( + !data.length }} + /> +); + +export default WithFailStates; diff --git a/src/containers/collection/presenter.tsx b/src/containers/collection/presenter.tsx index 6e65793c8..34d84ffb8 100644 --- a/src/containers/collection/presenter.tsx +++ b/src/containers/collection/presenter.tsx @@ -19,7 +19,6 @@ import Tease from '~components/molecules/tease'; import { useIsPersonFavorited } from '~lib/api/useIsPersonFavorited'; import { BaseColors } from '~lib/constants'; import root from '~lib/routes'; -import useLanguageRoute from '~lib/useLanguageRoute'; import { CatalogEntityType } from '~src/__generated__/graphql'; import Heading6 from '~src/components/atoms/heading6'; import AndFailStates from '~src/components/templates/andFailStates'; diff --git a/src/containers/playlist/item.tsx b/src/containers/playlist/item.tsx index 8afc2e633..62757d540 100644 --- a/src/containers/playlist/item.tsx +++ b/src/containers/playlist/item.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { Recording } from '~components/organisms/recording'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { Must } from '~src/types/types'; import { GetPublicPlaylistItemDetailDataQuery } from './__generated__/item'; diff --git a/src/containers/presenter/recordings.tsx b/src/containers/presenter/recordings.tsx index 5a8e59cde..a12b02a9e 100644 --- a/src/containers/presenter/recordings.tsx +++ b/src/containers/presenter/recordings.tsx @@ -9,8 +9,8 @@ import RssAlternate from '~components/molecules/rssAlternate'; import { BaseColors } from '~lib/constants'; import { PaginatedProps } from '~lib/getPaginatedStaticProps'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { Must } from '~src/types/types'; import { PresenterPivotFragment } from './__generated__/pivot'; diff --git a/src/containers/sermon/list.tsx b/src/containers/sermon/list.tsx index 91fe95caf..8a6b46b78 100644 --- a/src/containers/sermon/list.tsx +++ b/src/containers/sermon/list.tsx @@ -7,8 +7,8 @@ import RssAlternate from '~components/molecules/rssAlternate'; import PaginatedCardList from '~components/organisms/paginatedCardList'; import { PaginatedProps } from '~lib/getPaginatedStaticProps'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { GetSermonListPageDataQuery } from './__generated__/list'; diff --git a/src/containers/song/books/track.tsx b/src/containers/song/books/track.tsx index e199324c7..72f6d0b5a 100644 --- a/src/containers/song/books/track.tsx +++ b/src/containers/song/books/track.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { Recording } from '~components/organisms/recording'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { Must } from '~src/types/types'; import { GetBookSongDetailDataQuery } from './__generated__/track'; diff --git a/src/containers/sponsor/detail.tsx b/src/containers/sponsor/detail.tsx index e318b6bb3..2ad885f23 100644 --- a/src/containers/sponsor/detail.tsx +++ b/src/containers/sponsor/detail.tsx @@ -24,9 +24,9 @@ import { useIsSponsorFavorited } from '~lib/api/useIsSponsorFavorited'; import { BaseColors } from '~lib/constants'; import root from '~lib/routes'; import ForwardIcon from '~public/img/icons/icon-forward-light.svg'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { CatalogEntityType } from '~src/__generated__/graphql'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { Must } from '~src/types/types'; import { GetSponsorDetailPageDataQuery } from './__generated__/detail'; diff --git a/src/containers/sponsor/teachings.tsx b/src/containers/sponsor/teachings.tsx index 964c13d08..2fa3b5bac 100644 --- a/src/containers/sponsor/teachings.tsx +++ b/src/containers/sponsor/teachings.tsx @@ -9,8 +9,8 @@ import RssAlternate from '~components/molecules/rssAlternate'; import { BaseColors } from '~lib/constants'; import { PaginatedProps } from '~lib/getPaginatedStaticProps'; import root from '~lib/routes'; -import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import AndFailStates from '~src/components/templates/andFailStates'; +import useLanguageRoute from '~src/lib/hooks/useLanguageRoute'; import { Must } from '~src/types/types'; import { SponsorPivotFragment } from './__generated__/pivot'; diff --git a/src/lib/getBibleStaticProps.ts b/src/lib/getBibleStaticProps.ts index c9cad7405..aaf55ae10 100644 --- a/src/lib/getBibleStaticProps.ts +++ b/src/lib/getBibleStaticProps.ts @@ -64,6 +64,8 @@ async function transform( title: bible.title, contentType: CollectionContentType.BibleVersion, }, + speakers: [], + sponsor: null, }; }, );