fixed code

This commit is contained in:
Hope87
2021-07-05 12:33:24 +03:00
parent 082ae23f49
commit e8b7fbb2f3
8 changed files with 39 additions and 232 deletions

View File

@ -6,6 +6,7 @@ const Form = () => {
const [email, setEmail] = useState('');
const [phone, setPhone] = useState('');
const [comment, setСomment] = useState('');
const [name, setName] = useState('');
const handleChange = (e) => {
const name = e.target.name;
@ -31,11 +32,17 @@ const Form = () => {
comment: comment,
};
fetchForm('https://guild.craft-group.xyz/api/profile/add-to-interview', info).then((el) =>
el.json().then((e) => console.log('object ', e))
);
fetchForm('https://guild.craft-group.xyz/api/profile/add-to-interview', info)
.then((el) => {
return el.json();
})
.then((e) => {
setName(e);
});
};
console.log('NAME ', name);
return (
<div className="container">
<div className="row">