From e0fb04b060f5db63dbe98614d3ee087c25d08f4d Mon Sep 17 00:00:00 2001 From: clean99 Date: Fri, 24 Nov 2023 11:20:14 +0800 Subject: [PATCH] feat: update generate instruction --- frontend/src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index cd68474..956ad03 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -101,6 +101,7 @@ function App() { function doGenerateCode(params: CodeGenerationParams) { setExecutionConsole([]); + setMistakesNum(0); setAppState(AppState.CODING); // Merge settings with params @@ -133,8 +134,7 @@ function App() { setAppState(AppState.CODE_READY); setUpdateInstruction(instruction => { setMistakesNum(calculateMistakesNum(instruction)); - handleInstructions(instruction); - return instruction; + return handleInstructions(instruction); }); }