File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,17 @@ export default function Signup({ prepopulateFormValues }: inferSSRProps<typeof g
9595 < div className = "mt-8 sm:mx-auto sm:w-full sm:max-w-md" >
9696 < div className = "bg-default mx-2 px-4 py-8 shadow sm:rounded-lg sm:px-10" >
9797 < FormProvider { ...methods } >
98- < form onSubmit = { methods . handleSubmit ( signUp ) } className = "bg-default space-y-6" >
98+ < form
99+ onSubmit = { ( event ) => {
100+ event . preventDefault ( ) ;
101+ event . stopPropagation ( ) ;
102+
103+ if ( methods . formState ?. errors ?. apiError ) {
104+ methods . clearErrors ( "apiError" ) ;
105+ }
106+ methods . handleSubmit ( signUp ) ( event ) ;
107+ } }
108+ className = "bg-default space-y-6" >
99109 { errors . apiError && < Alert severity = "error" message = { errors . apiError ?. message } /> }
100110 < div className = "space-y-2" >
101111 < TextField
You can’t perform that action at this time.
0 commit comments