diff --git a/package-lock.json b/package-lock.json index 7eae1b7e3..fb8bfa16a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -82,7 +82,7 @@ "babel-jest": "^27.5.1", "babel-loader": "^8.2.3", "babel-plugin-react-intl": "^8.2.4", - "concurrently": "^8.2.0", + "concurrently": "^8.2.1", "eslint": "^8.43.0", "eslint-config-next": "^13.0.3", "eslint-plugin-formatjs": "^3.0.0", @@ -10152,9 +10152,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "node_modules/concurrently": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.0.tgz", - "integrity": "sha512-nnLMxO2LU492mTUj9qX/az/lESonSZu81UznYDoXtz1IQf996ixVqPAgHXwvHiHCAef/7S8HIK+fTFK7Ifk8YA==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", + "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -31146,9 +31146,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concurrently": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.0.tgz", - "integrity": "sha512-nnLMxO2LU492mTUj9qX/az/lESonSZu81UznYDoXtz1IQf996ixVqPAgHXwvHiHCAef/7S8HIK+fTFK7Ifk8YA==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", + "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", "dev": true, "requires": { "chalk": "^4.1.2", diff --git a/package.json b/package.json index 09e006fd2..a9b3e6869 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "babel-jest": "^27.5.1", "babel-loader": "^8.2.3", "babel-plugin-react-intl": "^8.2.4", - "concurrently": "^8.2.0", + "concurrently": "^8.2.1", "eslint": "^8.43.0", "eslint-config-next": "^13.0.3", "eslint-plugin-formatjs": "^3.0.0", diff --git a/public/compiled-lang/en.json b/public/compiled-lang/en.json index 071fff605..1bdbfc758 100644 --- a/public/compiled-lang/en.json +++ b/public/compiled-lang/en.json @@ -1467,6 +1467,12 @@ "value": "Previous trending teachings" } ], + "discover_bibleBooksHeading": [ + { + "type": 0, + "value": "Discover Bible Books" + } + ], "discover_conferencesHeading": [ { "type": 0, @@ -1479,6 +1485,12 @@ "value": "Featured Teachings" } ], + "discover_presentersHeading": [ + { + "type": 0, + "value": "Discover Presenters" + } + ], "discover_recentBlogHeading": [ { "type": 0, @@ -3803,6 +3815,24 @@ "value": "Previous audiobooks" } ], + "organismSection__bibleBooksHeading": [ + { + "type": 0, + "value": "Bible Books" + } + ], + "organismSection__bibleBooksNext": [ + { + "type": 0, + "value": "Next Bible books" + } + ], + "organismSection__bibleBooksPrevious": [ + { + "type": 0, + "value": "Previous Bible books" + } + ], "organismSection_presentersHeading": [ { "type": 0, diff --git a/public/lang/en.json b/public/lang/en.json index 4d1d3467f..fade17e90 100644 --- a/public/lang/en.json +++ b/public/lang/en.json @@ -693,12 +693,18 @@ "discover__trendingTeachingsPrevious": { "string": "Previous trending teachings" }, + "discover_bibleBooksHeading": { + "string": "Discover Bible Books" + }, "discover_conferencesHeading": { "string": "Recent Conferences" }, "discover_featuredTeachingsHeading": { "string": "Featured Teachings" }, + "discover_presentersHeading": { + "string": "Discover Presenters" + }, "discover_recentBlogHeading": { "string": "Recent Blog Posts" }, @@ -1797,6 +1803,15 @@ "organismSection__audiobooksPrevious": { "string": "Previous audiobooks" }, + "organismSection__bibleBooksHeading": { + "string": "Bible Books" + }, + "organismSection__bibleBooksNext": { + "string": "Next Bible books" + }, + "organismSection__bibleBooksPrevious": { + "string": "Previous Bible books" + }, "organismSection_presentersHeading": { "string": "Presenters" }, diff --git a/src/components/organisms/cardSlider/section/Audiobooks.tsx b/src/components/organisms/cardSlider/section/audiobooks.tsx similarity index 100% rename from src/components/organisms/cardSlider/section/Audiobooks.tsx rename to src/components/organisms/cardSlider/section/audiobooks.tsx diff --git a/src/components/organisms/cardSlider/section/bibleBooks.graphql b/src/components/organisms/cardSlider/section/bibleBooks.graphql new file mode 100644 index 000000000..1c11992ae --- /dev/null +++ b/src/components/organisms/cardSlider/section/bibleBooks.graphql @@ -0,0 +1,20 @@ +query getSectionBibleBooks( + $language: Language! + $first: Int! = 3 + $after: String = null +) { + bibleBooks: featuredSequences( + contentType: BIBLE_BOOK + language: $language + first: $first + after: $after + ) { + nodes { + ...cardSequence + } + pageInfo { + hasNextPage + endCursor + } + } +} diff --git a/src/components/organisms/cardSlider/section/bibleBooks.tsx b/src/components/organisms/cardSlider/section/bibleBooks.tsx new file mode 100644 index 000000000..7ebf037dc --- /dev/null +++ b/src/components/organisms/cardSlider/section/bibleBooks.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { useIntl } from 'react-intl'; + +import { CardSequenceFragment } from '~src/components/molecules/card/__generated__/sequence'; +import CardSequence from '~src/components/molecules/card/sequence'; +import root from '~src/lib/routes'; +import { useLanguageId } from '~src/lib/useLanguageId'; + +import Section from '.'; +import { useInfiniteGetSectionBibleBooksQuery } from './__generated__/bibleBooks'; + +export default function BibleBooks(props: { + heading?: string | JSX.Element; +}): JSX.Element { + const intl = useIntl(); + const lang = useLanguageId(); + + const { + heading = intl.formatMessage({ + id: 'organismSection__bibleBooksHeading', + defaultMessage: 'Bible Books', + }), + } = props; + + return ( +
( + + )} + /> + ); +} diff --git a/src/components/organisms/cardSlider/section/presenters.tsx b/src/components/organisms/cardSlider/section/presenters.tsx index 26b36fd05..391e98420 100644 --- a/src/components/organisms/cardSlider/section/presenters.tsx +++ b/src/components/organisms/cardSlider/section/presenters.tsx @@ -9,19 +9,25 @@ import { useLanguageId } from '~src/lib/useLanguageId'; import Section from '.'; import { useInfiniteGetSectionPresentersQuery } from './__generated__/presenters'; -export default function Presenters(): JSX.Element { +export default function Presenters(props: { + heading?: string | JSX.Element; +}): JSX.Element { const intl = useIntl(); const lang = useLanguageId(); + const { + heading = intl.formatMessage({ + id: 'organismSection_presentersHeading', + defaultMessage: 'Presenters', + }), + } = props; + return (
+ + } + /> + + } + /> diff --git a/src/pages/[language]/discover/index.ts b/src/pages/[language]/discover/index.ts index 5bea47b75..d119f9024 100644 --- a/src/pages/[language]/discover/index.ts +++ b/src/pages/[language]/discover/index.ts @@ -36,6 +36,8 @@ export async function getStaticProps({ getSectionConferences: { language }, getSectionBlogPosts: { language }, getSectionTopics: { language }, + getSectionPresenters: { language }, + getSectionBibleBooks: { language }, getSectionTrendingMusic: { language }, });