From 29a4e2488151861c10abeb0a05622e4d06e07c60 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 5 Dec 2019 17:34:44 +0100 Subject: Fix SSR on PostList --- components/Posts/PostList/parentMixin.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 components/Posts/PostList/parentMixin.js (limited to 'components/Posts/PostList/parentMixin.js') diff --git a/components/Posts/PostList/parentMixin.js b/components/Posts/PostList/parentMixin.js new file mode 100644 index 0000000..e5b06ed --- /dev/null +++ b/components/Posts/PostList/parentMixin.js @@ -0,0 +1,9 @@ +import { getPosts } from './index' + +export default { + async asyncData() { + return { + posts: await getPosts() + } + } +} -- cgit 1.4.1