diff --git a/src/index.tsx b/src/index.tsx index 566081c..f0c9ab1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -50,17 +50,23 @@ if ('serviceWorker' in navigator) { * Prompts user if update is available and handles download/install */ async function checkForUpdates() { + console.log('Checking for updates...'); try { const update = await check(); + console.log('Update check result:', update); if (update) { + console.log(`Update available: ${update.version}`); const shouldUpdate = await ask( `A new version (${update.version}) is available. Would you like to update now?`, { title: 'Update Available', kind: 'info' } ); if (shouldUpdate) { + console.log('User chose to update, downloading...'); await update.downloadAndInstall(); await relaunch(); } + } else { + console.log('App is up to date'); } } catch (error) { console.error('Failed to check for updates:', error);