File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import {
37
37
Hash ,
38
38
MessageSquare ,
39
39
Send ,
40
- Terminal
40
+ Terminal ,
41
41
} from "lucide-react" ;
42
42
43
43
import { toast } from "react-toastify" ;
@@ -72,10 +72,6 @@ const App = () => {
72
72
prompts : null ,
73
73
tools : null ,
74
74
} ) ;
75
-
76
- const clearError = ( tabKey : keyof typeof errors ) => {
77
- setErrors ( ( prev ) => ( { ...prev , [ tabKey ] : null } ) ) ;
78
- } ;
79
75
const [ command , setCommand ] = useState < string > ( ( ) => {
80
76
return localStorage . getItem ( "lastCommand" ) || "mcp-server-everything" ;
81
77
} ) ;
@@ -210,6 +206,10 @@ const App = () => {
210
206
] ) ;
211
207
} ;
212
208
209
+ const clearError = ( tabKey : keyof typeof errors ) => {
210
+ setErrors ( ( prev ) => ( { ...prev , [ tabKey ] : null } ) ) ;
211
+ } ;
212
+
213
213
const makeRequest = async < T extends ZodType < object > > (
214
214
request : ClientRequest ,
215
215
schema : T ,
@@ -224,7 +224,7 @@ const App = () => {
224
224
pushHistory ( request , response ) ;
225
225
226
226
if ( tabKey !== undefined ) {
227
- setErrors ( ( prev ) => ( { ... prev , [ tabKey ] : null } ) ) ;
227
+ clearError ( tabKey ) ;
228
228
}
229
229
230
230
return response ;
You can’t perform that action at this time.
0 commit comments