about summary refs log tree commit diff
path: root/components/Posts/PostList/parentMixin.js
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-12-05 17:34:44 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-12-05 17:34:44 +0100
commit29a4e2488151861c10abeb0a05622e4d06e07c60 (patch)
treec237820ce1f7588d44820f64163bc0caaa693d7f /components/Posts/PostList/parentMixin.js
parent6a532274bf7d69cefe9e640274f30c3fdcc17c92 (diff)
downloadpuszcza-29a4e2488151861c10abeb0a05622e4d06e07c60.tar.gz
puszcza-29a4e2488151861c10abeb0a05622e4d06e07c60.zip
Fix SSR on PostList
Diffstat (limited to 'components/Posts/PostList/parentMixin.js')
-rw-r--r--components/Posts/PostList/parentMixin.js9
1 files changed, 9 insertions, 0 deletions
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()
+    }
+  }
+}