File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,7 @@ yarn-error.log*
3434* .tsbuildinfo
3535next-env.d.ts
3636
37+ # misc
3738public /original
39+ launch.json
40+ .github /workflows /main.yaml
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export default function SignUp() {
4444 const {
4545 handleSubmit,
4646 register,
47- resetField ,
47+ reset ,
4848 formState : { errors, isSubmitting }
4949 } = useForm < SignUpSchema > ( {
5050 resolver : zodResolver ( signUpSchema ) ,
@@ -74,10 +74,7 @@ export default function SignUp() {
7474
7575 if ( data . error ) {
7676 recaptchaRef . current ?. reset ( ) ;
77- resetField ( "email" ) ;
78- resetField ( "username" ) ;
79- resetField ( "password" ) ;
80- resetField ( "confirmPassword" ) ;
77+ reset ( ) ;
8178 setIsVerified ( false ) ;
8279 throw data . error ;
8380 } else {
@@ -88,7 +85,9 @@ export default function SignUp() {
8885 type : "success"
8986 } ) ;
9087
91- route . push ( "/" ) ;
88+ setTimeout ( ( ) => {
89+ route . push ( "/" ) ;
90+ } , 3000 ) ;
9291 }
9392 } catch ( error : any ) {
9493 if ( error . status === 400 ) {
@@ -107,10 +106,7 @@ export default function SignUp() {
107106 }
108107
109108 recaptchaRef . current ?. reset ( ) ;
110- resetField ( "email" ) ;
111- resetField ( "username" ) ;
112- resetField ( "password" ) ;
113- resetField ( "confirmPassword" ) ;
109+ reset ( ) ;
114110 setIsVerified ( false ) ;
115111 }
116112 } ;
You can’t perform that action at this time.
0 commit comments