diff --git a/package-lock.json b/package-lock.json index d6c7c6758..03f46021a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11204,9 +11204,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001684", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", - "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", + "version": "1.0.30001686", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", + "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", "funding": [ { "type": "opencollective", diff --git a/src/components/organisms/passageNavigation.graphql b/src/components/organisms/passageNavigation.graphql index b81fc42f5..84424ff48 100644 --- a/src/components/organisms/passageNavigation.graphql +++ b/src/components/organisms/passageNavigation.graphql @@ -1,16 +1,11 @@ -fragment passageNavigation on BibleConnection { - nodes { - title - books { +fragment passageNavigation on Sequence { + id + title + recordings(first: 150) { + nodes { id title - chapters { - title - url - } + canonicalPath } } - aggregate { - count - } } diff --git a/src/components/organisms/passageNavigation.tsx b/src/components/organisms/passageNavigation.tsx index 541faf134..96ca61f5f 100644 --- a/src/components/organisms/passageNavigation.tsx +++ b/src/components/organisms/passageNavigation.tsx @@ -2,56 +2,45 @@ import clsx from 'clsx'; import React, { useState } from 'react'; import Link from '~components/atoms/linkWithoutPrefetch'; -import root from '~src/lib/routes'; -import useLanguageRoute from '~src/lib/useLanguageRoute'; -import { IBibleBook } from '~src/services/fcbh/types'; +import { PassageNavigationFragment } from './__generated__/passageNavigation'; import styles from './passageNavigation.module.scss'; type Props = { - books: IBibleBook[]; + books: Array; }; export default function PassageNavigation({ books }: Props): JSX.Element { - const [selectedBook, setSelectedBook] = useState( - books[0]?.name, + const [selectedBook, setSelectedBook] = useState( + null, ); - const languageRoute = useLanguageRoute(); - return (