(id)
| 33 | }; |
| 34 | |
| 35 | export const likePost = (id) => async (dispatch) => { |
| 36 | try { |
| 37 | const { data } = await api.likePost(id); |
| 38 | |
| 39 | dispatch({ type: LIKE, payload: data }); |
| 40 | } catch (error) { |
| 41 | console.log(error.message); |
| 42 | } |
| 43 | }; |
| 44 | |
| 45 | export const deletePost = (id) => async (dispatch) => { |
| 46 | try { |