add form page
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user