From bece5ee118bdd7ab1e4c0124bd8598403923d51f Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Fri, 13 Dec 2024 17:28:57 +0100 Subject: [PATCH] fix: collection --- src/lib/albert.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/albert.ts b/src/lib/albert.ts index 51221c3..e627734 100644 --- a/src/lib/albert.ts +++ b/src/lib/albert.ts @@ -46,7 +46,9 @@ export const useAlbertCollections = () => { }; useEffect(() => { - reloadCollections(); + if (!collections.length) { + reloadCollections(); + } }, [reloadCollections]); return { collections, reloadCollections }; @@ -115,7 +117,7 @@ export const addFileToCollection = async ({ return json; } return { - detail: "plop", + detail: "erreur", }; }); };