(id)
| 52 | |
| 53 | |
| 54 | const remove = async (id) => { |
| 55 | try { |
| 56 | const response = await axios.delete(`api/notes/${id}`); |
| 57 | return response.data; |
| 58 | } catch (error) { |
| 59 | console.error('Error posting todo:', error); |
| 60 | throw error; |
| 61 | } |
| 62 | }; |
| 63 | |
| 64 | |
| 65 | const mutation = useMutation(remove, { |