Skip to content

Commit

Permalink
data >> versions
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 26, 2024
1 parent cc97c4d commit 4444c15
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/organisms/recording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export function Recording({
<meta property="og:image" content={imageWithFallback.url} />
</Head>

{'data' in props ? (
<PassageNavigation versions={props.data} chapter={recording}>
{'versions' in props ? (
<PassageNavigation versions={props.versions} chapter={recording}>
<RecordingInner
recording={recording}
overrideSequence={overrideSequence}
Expand Down
8 changes: 4 additions & 4 deletions src/containers/bible/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import PassageNavigation, {
import AndFailStates from '~src/components/templates/andFailStates';

export interface BibleIndexProps {
data: Array<Version>;
versions: Array<Version>;
}

function Bible({ data }: BibleIndexProps): JSX.Element {
function Bible({ versions }: BibleIndexProps): JSX.Element {
return (
<Tease>
<PassageNavigation versions={data} />
<PassageNavigation versions={versions} />
</Tease>
);
}
Expand All @@ -22,7 +22,7 @@ const WithFailStates = (props: BibleIndexProps) => (
<AndFailStates
Component={Bible}
componentProps={props}
options={{ should404: ({ data }) => !data.length }}
options={{ should404: ({ versions }) => !versions.length }}
/>
);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/getBibleStaticProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { IBibleBookChapter, IBibleVersion } from '~src/services/fcbh/types';

import root from './routes';

type ApiBible = BibleIndexProps['data'][0];
type ApiBible = BibleIndexProps['versions'][0];
type ApiBook = NonNullable<ApiBible['sequences']['nodes']>[0];
type ApiChapter = NonNullable<ApiBook['recordings']['nodes']>[0];

Expand Down
2 changes: 1 addition & 1 deletion src/pages/[language]/bibles/chapters/[id]/[[...slugs]].ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function getStaticProps({

return {
props: {
data: concatBibles(fcbhBibles, apiBibles),
versions: concatBibles(fcbhBibles, apiBibles),
recording,
title: recording?.title,
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[language]/bibles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function getStaticProps({

return {
props: {
data: concatBibles(fcbhBibles, apiBibles),
versions: concatBibles(fcbhBibles, apiBibles),
title: intl.formatMessage({
id: 'bible__title',
defaultMessage: 'Bible',
Expand Down

0 comments on commit 4444c15

Please sign in to comment.