From 08666eebee15a8ef51507254f9d2f58fe8b9fb57 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 24 Mar 2026 09:07:21 +0100 Subject: [PATCH] Respuesta correcta de la api --- frontend/src/App.jsx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index a0f6f3d..284ac4a 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -12,10 +12,13 @@ function App() { const handleCalculate = async () => { setIsLoading(true); setResult(null); + + const firstIndex = "0"; + const lastIndex = (levels.length - 1).toString(); const currentReferences = { - [levels[0]]: 0, - [levels[levels.length - 1]]: 1 + [firstIndex]: 0, + [lastIndex]: 1 }; const payload = { @@ -200,16 +203,6 @@ function App() { - {/* --- NUEVO: CAJA PARA VER EL RESULTADO (TEMPORAL PARA DEBUG) --- */} - {result && ( -
-

Respuesta del Backend:

-
-              {JSON.stringify(result, null, 2)}
-            
-
- )} - ); }