Fixed sign in redirect on success

This commit is contained in:
2023-07-29 18:11:05 +03:00
parent ef94349341
commit e214ea53e7
3 changed files with 14 additions and 4 deletions

View File

@ -26,9 +26,11 @@ function AuthForm({ goBack, register }: AuthFormProps) {
) : true
if (accountCreated) {
await handleSignIn(composeSignInBody(formData))
goBack()
if (await handleSignIn(composeSignInBody(formData))) {
goBack()
}
}
})()
}, [register, goBack, handleSignUp, handleSignIn])
@ -61,7 +63,7 @@ function AuthForm({ goBack, register }: AuthFormProps) {
<Form.Check>
<Form.Check.Input type='checkbox' required />
<Form.Check.Label>
Я согласен с <a href={`${document.location.origin}/privacy_policy.pdf`} target='_blank' rel='noopener noreferrer'>условиями обработки персональных данных</a>
Я согласен с <a href={`${document.location.origin}/privacy_policy.pdf`} target='_blank'>условиями обработки персональных данных</a>
</Form.Check.Label>
</Form.Check>
</Form.Group>