Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

reset any existing state when code is imported

Abi Raja85c8fa4ca109
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index f9b3e7b7..aafc4607 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -320,6 +320,9 @@ function App() {
}
function importFromCode(code: string, stack: Stack) {
+ // Reset any existing state
+ reset();
+
// Set input state
setIsImportedFromCode(true);