From 0c2dcdf243a3e69ca5b2dd0b6e4c243dfa7a7edc Mon Sep 17 00:00:00 2001 From: Anis SMAIL Date: Thu, 9 Jan 2025 10:41:28 +0100 Subject: [PATCH] fix(study-tree): remove console log, add locales --- webapp/public/locales/en/main.json | 1 + webapp/public/locales/fr/main.json | 1 + webapp/src/components/App/Studies/StudyTree/index.tsx | 7 +++---- webapp/src/components/App/Studies/StudyTree/utils.ts | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/public/locales/en/main.json b/webapp/public/locales/en/main.json index 1f13b6e551..75b0530941 100644 --- a/webapp/public/locales/en/main.json +++ b/webapp/public/locales/en/main.json @@ -679,6 +679,7 @@ "studies.tree.error.failToFetchWorkspace": "Failed to load workspaces", "studies.tree.error.failToFetchFolder": "Failed to load subfolders for {{path}}", "studies.tree.error.detailsInConsole": "Details logged in the console", + "studies.tree.fetchFolderLoading": "Loading...", "variants.createNewVariant": "Create new variant", "variants.newVariant": "New variant", "variants.newCommand": "Add new command", diff --git a/webapp/public/locales/fr/main.json b/webapp/public/locales/fr/main.json index 14dbcda923..68daa25694 100644 --- a/webapp/public/locales/fr/main.json +++ b/webapp/public/locales/fr/main.json @@ -678,6 +678,7 @@ "studies.tree.error.failToFetchWorkspace": "Échec lors de la récupération de l'espace de travail", "studies.tree.error.failToFetchFolder": "Échec lors de la récupération des sous dossiers de {{path}}", "studies.tree.error.detailsInConsole": "Détails de l'érreur dans la console", + "studies.tree.fetchFolderLoading": "Chargement...", "variants.createNewVariant": "Créer une nouvelle variante", "variants.newVariant": "Nouvelle variante", "variants.newCommand": "Ajouter une nouvelle commande", diff --git a/webapp/src/components/App/Studies/StudyTree/index.tsx b/webapp/src/components/App/Studies/StudyTree/index.tsx index e99eaab554..cf30cd27dc 100644 --- a/webapp/src/components/App/Studies/StudyTree/index.tsx +++ b/webapp/src/components/App/Studies/StudyTree/index.tsx @@ -109,7 +109,6 @@ function StudyTree() { t("studies.tree.error.detailsInConsole"), ); } - console.log("treeAfterSubfoldersUpdate", treeAfterSubfoldersUpdate); setStudiesTree(treeAfterSubfoldersUpdate); } @@ -144,9 +143,9 @@ function StudyTree() { onClick={() => handleTreeItemClick(id, child)} > ); diff --git a/webapp/src/components/App/Studies/StudyTree/utils.ts b/webapp/src/components/App/Studies/StudyTree/utils.ts index 091f956151..07a39dfe85 100644 --- a/webapp/src/components/App/Studies/StudyTree/utils.ts +++ b/webapp/src/components/App/Studies/StudyTree/utils.ts @@ -202,7 +202,6 @@ export async function fetchAndInsertSubfolders( const results = await Promise.allSettled( paths.map((path) => fetchSubfolders(path)), ); - console.log("results", results); return results.reduce<[StudyTreeNode, string[]]>( ([tree, failed], result, index) => { if (result.status === "fulfilled") {