Add debugging logs and manifest.json to help troubleshoot blank page issue
This commit is contained in:
15
frontend/public/manifest.json
Normal file
15
frontend/public/manifest.json
Normal file
@@ -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"
|
||||
}
|
||||
@@ -15,8 +15,13 @@ function App() {
|
||||
const [selectedChapter, setSelectedChapter] = useState<string>('');
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [darkMode, setDarkMode] = useState(false);
|
||||
const [error, setError] = useState<string>('');
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user