From 1aa3a88b21539aa06572d86324673baeddfbe46f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 25 Jan 2020 19:41:39 +0100 Subject: Add image from meta --- components/Posts/PostList/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'components/Posts/PostList/index.js') diff --git a/components/Posts/PostList/index.js b/components/Posts/PostList/index.js index 11d44ff..7e0b1f4 100644 --- a/components/Posts/PostList/index.js +++ b/components/Posts/PostList/index.js @@ -12,11 +12,12 @@ export const getPosts = async () => { } } -export const parsePosts = posts => - posts.map(post => ({ +export const parsePosts = (posts) => + posts.map((post) => ({ title: post.content.meta.title, + image: post.content.meta.image, description: post.content.description, - route: post.route + route: post.route, })) export default PostList -- cgit 1.4.1