import '../styles/List.css'; import config from '../config.json'; import LazyLoad from 'react-lazyload'; const List = ({data, reFetch}) => { function deleteEntity(id) { const address = config.api.address + ":" + config.api.port; fetch(address + "/api", { // Adding method type method: "DELETE", // Adding body or contents to send body: JSON.stringify({id}), // Adding headers to the request headers: { "Content-type": "application/json; charset=UTF-8", } }) .then(res => res.text()) .then(message => {console.log(message)}) .then(() => reFetch()) } return (