add form page

This commit is contained in:
Hope87
2021-07-03 17:37:30 +03:00
parent 629447c95c
commit 082ae23f49
16 changed files with 530 additions and 141 deletions

View File

@ -2,6 +2,8 @@ export const fetchProfile = async (link, index) => {
const response = await fetch(`${link}${index}`);
let data = await response.json();
console.log('data ', data);
return data;
};
@ -11,3 +13,22 @@ export const fetchSkills = async (link) => {
return data;
};
export const fetchItemsForId = async (link, id) => {
const response = await fetch(`${link}${id}`);
let data = await response.json();
return data;
};
export const fetchForm = async (link, info) => {
const response = await fetch(link, {
method: 'POST',
body: JSON.stringify(info),
headers: {
'Content-Type': 'application/json',
},
});
return response;
};