Fix TypeScript compilation errors in BookSelector and ChapterSelector by explicitly typing Set<string>

This commit is contained in:
Ryderjj89
2025-09-13 18:25:29 -04:00
parent 07c975b1d0
commit f008fc64b4
2 changed files with 10 additions and 10 deletions

View File

@@ -36,11 +36,11 @@ const ChapterSelector: React.FC<ChapterSelectorProps> = ({ book, onChapterSelect
if (response.ok) {
const data = await response.json();
const chapterFavorites = new Set(
data.favorites
.filter((fav: any) => fav.book === book && fav.chapter && !fav.verse_start) // Only chapter-level favorites for this book
.map((fav: any) => fav.chapter)
);
const favoriteChapters: string[] = data.favorites
.filter((fav: any) => fav.book === book && fav.chapter && !fav.verse_start) // Only chapter-level favorites for this book
.map((fav: any) => fav.chapter);
const chapterFavorites = new Set<string>(favoriteChapters);
setFavorites(chapterFavorites);
}
} catch (error) {