pass in args

This commit is contained in:
Ashwin Bhat
2024-11-19 11:42:11 -08:00
parent abff2486c1
commit c1a56810fb
3 changed files with 32 additions and 10 deletions

View File

@@ -186,9 +186,13 @@ const App = () => {
}, [args]);
useEffect(() => {
fetch("http://localhost:3000/default-environment")
fetch("http://localhost:3000/config")
.then((response) => response.json())
.then((data) => setEnv(data))
.then((data) => {
setEnv(data.defaultEnvironment);
setCommand(data.defaultCommand);
setArgs(data.defaultArgs);
})
.catch((error) =>
console.error("Error fetching default environment:", error),
);