From e04ae5c2a5a79b27bb7760d99b3e9b72d12bf243 Mon Sep 17 00:00:00 2001 From: Jake Coble Date: Thu, 19 Dec 2024 10:32:16 -0500 Subject: [PATCH] Properly update the selected chapter in the chapter grid --- .../organisms/passageNavigation/bookGrid.tsx | 12 +++++++++--- .../organisms/passageNavigation/bookList.tsx | 12 +++++++++--- .../organisms/passageNavigation/chapterGrid.tsx | 15 ++++----------- .../organisms/passageNavigation/index.tsx | 3 +++ 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/components/organisms/passageNavigation/bookGrid.tsx b/src/components/organisms/passageNavigation/bookGrid.tsx index 3eb2c100b..01421d054 100644 --- a/src/components/organisms/passageNavigation/bookGrid.tsx +++ b/src/components/organisms/passageNavigation/bookGrid.tsx @@ -2,16 +2,22 @@ import clsx from 'clsx'; import React from 'react'; import { PassageNavigationFragment } from './__generated__/index'; -import ChapterGrid from './chapterGrid'; +import ChapterGrid, { ChapterId } from './chapterGrid'; import styles from './index.module.scss'; type Props = { books: Array; selectedBook: string | number | null; selectBook: (id: string | number | null) => void; + chapterId: ChapterId; }; -export default function BookGrid({ books, selectedBook, selectBook }: Props) { +export default function BookGrid({ + books, + selectedBook, + selectBook, + chapterId, +}: Props) { return (