fix: try-catch en library-store.load() — evita spinner infinito si tablas no existen

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:31:57 -03:00
parent 11da15136d
commit de0209d834

View File

@@ -38,12 +38,17 @@ export const useLibraryStore = create<LibraryState>((set, get) => ({
load: async () => {
set({ isLoading: true })
try {
const [groups, processes, settings] = await Promise.all([
supabaseGroupRepo.getAll(),
supabaseProcessRepo.getAll(),
supabaseSettingsRepo.get(),
])
set({ groups, processes, settings, isLoading: false })
} catch (err) {
console.error('Error al cargar la biblioteca:', err)
set({ isLoading: false })
}
},
createGroup: async (name: string) => {