File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/pages/instance/Chatwoot Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,9 @@ function Chatwoot() {
8282 }
8383 } ) ;
8484
85- const onSubmit = async ( ) => {
85+ const onSubmit = async ( data : FormSchema ) => {
8686 if ( ! instance ) return ;
8787
88- const data = form . getValues ( ) ;
89-
9088 setLoading ( true ) ;
9189 const chatwootData : ChatwootType = {
9290 enabled : data . enabled ,
@@ -136,7 +134,10 @@ function Chatwoot() {
136134 return (
137135 < >
138136 < Form { ...form } >
139- < form className = "w-full space-y-6" >
137+ < form
138+ onSubmit = { form . handleSubmit ( onSubmit ) }
139+ className = "w-full space-y-6"
140+ >
140141 < div >
141142 < h3 className = "mb-1 text-lg font-medium" > { t ( "chatwoot.title" ) } </ h3 >
142143 < Separator className = "my-4" />
@@ -231,9 +232,7 @@ function Chatwoot() {
231232 </ div >
232233 </ div >
233234 < div className = "mx-4 flex justify-end" >
234- < Button type = "submit" onClick = { onSubmit } >
235- { t ( "chatwoot.button.save" ) }
236- </ Button >
235+ < Button type = "submit" > { t ( "chatwoot.button.save" ) } </ Button >
237236 </ div >
238237 </ form >
239238 </ Form >
You can’t perform that action at this time.
0 commit comments