М
Size: a a a
H
АК
PC
D
D
МК
CG
if(response.ok)
?fetch(`login`, {
method: 'POST',
body: formData,
}).then(response => response.json())
.then(json => {
localStorage.setItem('access_token', json.access_token)
dispatch(changeName({
name: json.username,
}));
})
.catch(error => alert('Что-то пошло не так :(' + error));
D
if(response.ok)
?fetch(`login`, {
method: 'POST',
body: formData,
}).then(response => response.json())
.then(json => {
localStorage.setItem('access_token', json.access_token)
dispatch(changeName({
name: json.username,
}));
})
.catch(error => alert('Что-то пошло не так :(' + error));
❄
AG