Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 26, 2024
1 parent d18361f commit f0b8869
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/templates/andIntl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
1 change: 0 additions & 1 deletion src/components/templates/andMiniplayer.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/account/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion src/containers/bible/book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ function BookInner({
)}`,
sequence: null,
collection: null,
recordingContentType: RecordingContentType.BibleChapter,
sponsor: {
title: 'Faith Comes By Hearing',
},
Expand Down
14 changes: 10 additions & 4 deletions src/containers/bible/index.tsx
Original file line number Diff line number Diff line change
@@ -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<Version>;
Expand All @@ -18,6 +18,12 @@ function Bible({ data }: BibleIndexProps): JSX.Element {
);
}

export default withFailStates(Bible, {
useShould404: ({ data }) => !data.length,
});
const WithFailStates = (props: BibleIndexProps) => (
<AndFailStates
Component={Bible}
componentProps={props}
options={{ should404: ({ data }) => !data.length }}
/>
);

export default WithFailStates;
1 change: 0 additions & 1 deletion src/containers/collection/presenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/playlist/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/presenter/recordings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/sermon/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/containers/song/books/track.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/sponsor/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/sponsor/teachings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 2 additions & 0 deletions src/lib/getBibleStaticProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ async function transform(
title: bible.title,
contentType: CollectionContentType.BibleVersion,
},
speakers: [],
sponsor: null,
};
},
);
Expand Down

0 comments on commit f0b8869

Please sign in to comment.