fix registration
This commit is contained in:
parent
2ec9354fc1
commit
08f827267d
12 changed files with 84 additions and 88 deletions
|
|
@ -38,10 +38,7 @@ const RegisterForm = () => {
|
|||
const responseData = await registerUser({username, firstName, lastName, email, password});
|
||||
if (responseData && !responseData.error) {
|
||||
console.log('Регистрация успешна');
|
||||
localStorage.setItem("user", JSON.stringify({
|
||||
firstName,
|
||||
lastName
|
||||
}));
|
||||
localStorage.setItem("user", JSON.stringify(responseData.user));
|
||||
navigate('/my-surveys');
|
||||
}
|
||||
else if (responseData.status === 409){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue