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 {
3737 Hash ,
3838 MessageSquare ,
3939 Send ,
40- Terminal
40+ Terminal ,
4141} from "lucide-react" ;
4242
4343import { toast } from "react-toastify" ;
@@ -72,10 +72,6 @@ const App = () => {
7272 prompts : null ,
7373 tools : null ,
7474 } ) ;
75-
76- const clearError = ( tabKey : keyof typeof errors ) => {
77- setErrors ( ( prev ) => ( { ...prev , [ tabKey ] : null } ) ) ;
78- } ;
7975 const [ command , setCommand ] = useState < string > ( ( ) => {
8076 return localStorage . getItem ( "lastCommand" ) || "mcp-server-everything" ;
8177 } ) ;
@@ -210,6 +206,10 @@ const App = () => {
210206 ] ) ;
211207 } ;
212208
209+ const clearError = ( tabKey : keyof typeof errors ) => {
210+ setErrors ( ( prev ) => ( { ...prev , [ tabKey ] : null } ) ) ;
211+ } ;
212+
213213 const makeRequest = async < T extends ZodType < object > > (
214214 request : ClientRequest ,
215215 schema : T ,
@@ -224,7 +224,7 @@ const App = () => {
224224 pushHistory ( request , response ) ;
225225
226226 if ( tabKey !== undefined ) {
227- setErrors ( ( prev ) => ( { ... prev , [ tabKey ] : null } ) ) ;
227+ clearError ( tabKey ) ;
228228 }
229229
230230 return response ;
You can’t perform that action at this time.
0 commit comments