Fix URL parameter logic - now both ESV and NKJV show version parameters consistently

Previously only NKJV added ?version=nkjv to URL while ESV had no parameter (treated as 'default')
Now both versions properly display in URL: ?version=esv and ?version=nkjv
This ensures consistent URL handling and bookmarking for all Bible versions
This commit is contained in:
Ryderjj89
2025-09-28 14:51:40 -04:00
parent 163532158f
commit 55bbc98188

View File

@@ -58,7 +58,7 @@ function App() {
loadBooks();
// Update URL with version when it changes
const url = new URL(window.location.href);
if (selectedVersion !== 'esv') { // Only add if not default
if (selectedVersion) { // Add version parameter when selected
url.searchParams.set('version', selectedVersion);
} else {
url.searchParams.delete('version');