import { callAPI } from '../utils/api' import React from 'react' const Item = ({ id, text, done, refresh }) => { const _done = (e) => callAPI(null, { url: `/api/items/${id}`, method: 'patch', data: { done: e.target.checked, }, }).then(refresh) const _delete = (e) => callAPI(null, { url: `/api/items/${id}`, method: 'delete', }).then(refresh) return
{text}
{/* language=CSS */} } export default Item