From 9d71a835ca4c849e33ff69bd1ebb2545bcaf66ec Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Sat, 13 Sep 2025 12:39:34 -0400 Subject: [PATCH] Add debugging logs and manifest.json to help troubleshoot blank page issue --- frontend/public/manifest.json | 15 +++++++++++++++ frontend/src/App.tsx | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 frontend/public/manifest.json diff --git a/frontend/public/manifest.json b/frontend/public/manifest.json new file mode 100644 index 00000000..00e3e4ca --- /dev/null +++ b/frontend/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "ESV Bible", + "name": "ESV Bible App", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5e6b603a..29efaf4b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -15,8 +15,13 @@ function App() { const [selectedChapter, setSelectedChapter] = useState(''); const [loading, setLoading] = useState(true); const [darkMode, setDarkMode] = useState(false); + const [error, setError] = useState(''); + + // Debug logging + console.log('App component rendered'); useEffect(() => { + console.log('App useEffect triggered'); loadBooks(); }, []); @@ -30,10 +35,13 @@ function App() { const loadBooks = async () => { try { + console.log('Loading books from API...'); const data: BookData = await getBooks(); + console.log('Books loaded:', data); setBooks(data.books); } catch (error) { console.error('Failed to load books:', error); + setError('Failed to load books. Please check the console for details.'); } finally { setLoading(false); }