From 31056c816edcd4a71f0b0f238b173a2d516f095c Mon Sep 17 00:00:00 2001 From: Silberengel Date: Wed, 10 Dec 2025 23:49:54 +0100 Subject: [PATCH] change the book:: default to book --- src/components/Bookstr/BookstrContent.tsx | 8 ++++---- src/lib/bookstr-parser.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Bookstr/BookstrContent.tsx b/src/components/Bookstr/BookstrContent.tsx index 81a7fe9..caf1045 100644 --- a/src/components/Bookstr/BookstrContent.tsx +++ b/src/components/Bookstr/BookstrContent.tsx @@ -244,7 +244,7 @@ export function BookstrContent({ wikilink, sourceUrl, className, skipWebPreview const result = parseBookWikilink(wikilinkToParse) if (result) { - const inferredBookType = result.bookType || 'bible' + const inferredBookType = result.bookType || 'book' const parsedResult = { ...result, bookType: inferredBookType } // Only log if this is a new parse (not a re-render with same wikilink) @@ -399,7 +399,7 @@ export function BookstrContent({ wikilink, sourceUrl, className, skipWebPreview const newSections: BookSection[] = [] // Step 1: Check cache for ALL references first (in parallel) - const bookType = (parsed as any).bookType || 'bible' + const bookType = (parsed as any).bookType || 'book' const cacheChecks = parsed.references.map(async (ref) => { const normalizedBook = ref.book.toLowerCase().replace(/\s+/g, '-') const versionsToFetch = parsed.versions || (ref.version ? [ref.version] : []) @@ -979,8 +979,8 @@ export function BookstrContent({ wikilink, sourceUrl, className, skipWebPreview {/* External URL preview/button for bible/torah/quran */} {(() => { - // Get bookType from parsed wikilink (defaults to 'bible') - const bookType = parsed?.bookType || 'bible' + // Get bookType from parsed wikilink (defaults to 'book') + const bookType = parsed?.bookType || 'book' // Only show external link for bible, torah, or quran collections // Other collections (secular books) don't have external links diff --git a/src/lib/bookstr-parser.ts b/src/lib/bookstr-parser.ts index 28fe4a2..732fb10 100644 --- a/src/lib/bookstr-parser.ts +++ b/src/lib/bookstr-parser.ts @@ -125,8 +125,8 @@ export function parseBookWikilink(wikilink: string): { references: BookReference } // Use collection as bookType (e.g., "bible", "quran", "torah") - // If no collection, default to "bible" - const inferredBookType = collection || 'bible' + // If no collection, default to "book" + const inferredBookType = collection || 'book' return { references, versions, bookType: inferredBookType } }