client/src/components/DeleteButton/index.js
// Delete lead function that makes api call to the backend
Delete lead function that makes api call to the backend
Delete lead function that makes api call to the backend
deleteLead(e) {
  e.preventDefault()
  API.deleteLead(this.props.id).then(res => {
    console.log(res.data)
  })
    .catch(err => console.log(err));
}
deleteLead ( e ) { e . preventDefault ( ) API . deleteLead ( this . props . id ) . then ( res => { console . log ( res . data ) } ) . catch ( err => console . log ( err ) ) ; }
Delete lead function that makes api call to the backend
Delete lead function that makes api call to the backend