export const post = (url, data) => { const options = { method: 'POST', body: JSON.stringify(data), headers: { 'Content-Type': 'application/json', }, }; return new Promise((reslove, reject) => { fetch(url, options) .then((response) => response.json()) .then((data) => console.log(data)) .catch((error) => console.error('Error:', error)); }); };