diff --git a/components/bible/search-navigator.tsx b/components/bible/search-navigator.tsx index fab75dd..1bec3c8 100644 --- a/components/bible/search-navigator.tsx +++ b/components/bible/search-navigator.tsx @@ -32,7 +32,9 @@ export function SearchNavigator({ onNavigate }: SearchNavigatorProps) { return ( setQuery(e.target.value)} onFocus={() => query && setIsOpen(true)} @@ -64,6 +66,8 @@ export function SearchNavigator({ onNavigate }: SearchNavigatorProps) { {isOpen && results.length > 0 && ( {results.map((result, idx) => ( - handleSelect(result)}> + handleSelect(result)} + > {result.reference} diff --git a/lib/bible-search.ts b/lib/bible-search.ts index 6bb0d15..d959087 100644 --- a/lib/bible-search.ts +++ b/lib/bible-search.ts @@ -131,7 +131,7 @@ export function parseReference(ref: string): { bookId: number; chapter: number } for (const book of BIBLE_BOOKS) { if (book.name.toLowerCase().startsWith(bookQuery) || - book.abbr.toLowerCase() === bookQuery) { + book.abbr.toLowerCase().startsWith(bookQuery)) { return { bookId: book.id, chapter: Math.max(1, Math.min(chapterNum, book.chapters))