fetch("http://localhost:3000/user")
.then(res => res.json())
.then(log => {
console.log(log)
log.forEach(p => {
if (p.login === login && p.password === password) {
userId =
p.id;
number();
return setIsLogin(true);
}
})
setLogin('');
setPassword('');
})
.catch(err => console.log(err))