fix: resolve blank screen on return from external links

This commit is contained in:
2026-03-03 20:51:17 -05:00
parent 7ff205b12a
commit af7464be43
7 changed files with 108 additions and 18 deletions

View File

@ -26,12 +26,25 @@ export const useShuttleStore = defineStore('shuttle', () => {
}
}
// Recarga silenciosa: no activa el spinner (para refocus desde background)
async function silentReload() {
if (shuttles.value.length === 0) { return loadShuttles() }
error.value = null
try {
shuttles.value = await shuttlesService.getAllShuttles(filters.value)
} catch (e) {
console.error('Error silent-reloading shuttles:', e)
// No mostrar error si ya hay datos
}
}
return {
shuttles,
isLoading,
error,
filters,
loadShuttles,
silentReload,
}
}, {
persist: {