From 78e4f7b3ae63a8ac302f39305d04e811e17c81a7 Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Sun, 28 Sep 2025 14:22:34 -0400 Subject: [PATCH] Fix logo loading and URL parameter persistence Backend: - Added static file serving for /logos directory - Logos now accessible at /logos/path for Docker builds Frontend: - Updated all navigation to include version parameters (?version=esv|?version=nkjv) - Book selection includes version in URL - Breadcrumb navigation preserves version context - URLs now work for bookmarking and sharing with version information Complete fix for both logo display and navigation URL persistence. --- backend/src/index.js | 3 +++ frontend/src/App.tsx | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/backend/src/index.js b/backend/src/index.js index 2bebe807..8efd2a5c 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -32,6 +32,9 @@ configureAuth(app); // Serve static files from the React build app.use(express.static(path.join(__dirname, '../../frontend/build'))); +// Serve logos folder as static files +app.use('/logos', express.static(path.join(__dirname, '../../frontend/logos'))); + // Bible data directories const ESV_DATA_DIR = path.join(__dirname, '../../bible-data'); // ESV from mdbible const NKJV_DATA_DIR = path.join(__dirname, '../../NKJV'); // NKJV local files diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 25b327fc..ef018c62 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -269,7 +269,8 @@ function App() { const handleBookSelect = (book: string) => { const urlName = getBookUrlName(book); - navigate(`/book/${urlName}`); + const url = selectedVersion ? `/book/${urlName}?version=${selectedVersion}` : `/book/${urlName}`; + navigate(url); }; const handleFavoriteChange = () => { @@ -426,7 +427,10 @@ function App() { {currentBook && ( <>