()
| 16 | } |
| 17 | |
| 18 | const fetchPosts = async () => { |
| 19 | console.info('Fetching posts...') |
| 20 | return axios |
| 21 | .get<Array<PostType>>(`${queryURL}/posts`) |
| 22 | .then((r) => r.data.slice(0, 10)) |
| 23 | } |
| 24 | |
| 25 | const fetchPost = async (postId: string) => { |
| 26 | console.info(`Fetching post with id ${postId}...`) |