From 9494f4c1cc9109d7ba3fc1f8642eaed14ce6ae73 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Thu, 14 Dec 2023 08:27:16 -0500 Subject: [PATCH] fix reset function to reset all state correctly --- frontend/src/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 27937ca..658b6ef 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -125,9 +125,11 @@ function App() { setGeneratedCode(""); setReferenceImages([]); setExecutionConsole([]); + setUpdateInstruction(""); + setIsImportedFromCode(false); setAppHistory([]); setCurrentVersion(null); - setIsImportedFromCode(false); + setShouldIncludeResultImage(false); }; const cancelCodeGeneration = () => { @@ -199,6 +201,7 @@ function App() { }); } }, + // On status update (line) => setExecutionConsole((prev) => [...prev, line]), // On cancel () => {