articles page default articles

This commit is contained in:
tmshv committed 2019-10-13 16:12:42 +03:00
1 parent 6352ca66d9
commit 44d2ba7bff
1 file changed
+1 -1
+1 -1
View File
@@ -33,7 +33,7 @@ Page.getInitialProps = async (ctx) => {
const page = parseInt(ctx.query.page)
const pageSize = parseInt(ctx.query.pageSize) || 15
const res = await requestGet(createApiUrl(ctx.req, `/api/articles?page=${page}&pageSize=${pageSize}`), {})
const articles = res.items
const articles = res.items || []
const nextPage = res.nextPage
const prevPage = res.prevPage
const title = 'События'