()
| 5 | const queryURL = 'https://jsonplaceholder.typicode.com' |
| 6 | |
| 7 | export const fetchPosts = async () => { |
| 8 | console.info('Fetching posts...') |
| 9 | return axios.get(`${queryURL}/posts`).then((r) => r.data.slice(0, 10)) |
| 10 | } |
| 11 | |
| 12 | export const fetchPost = async (postId) => { |
| 13 | console.info(`Fetching post with id ${postId}...`) |