From 07cd42abc1fc9f2396eae3ba701872edab844e1d Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Fri, 2 Aug 2019 15:58:15 +0300 Subject: [PATCH] next config refactoring --- next.config.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/next.config.js b/next.config.js index 0c7180ed..62c4c0af 100644 --- a/next.config.js +++ b/next.config.js @@ -27,8 +27,9 @@ module.exports = withCss(withSass({ return null } - const lastArticlesPage = 8 - + const articlesPageSize = 15 + const articlesLastPage = 8 + return { // ...defaultPathMap, '/': { page: '/' }, @@ -40,8 +41,8 @@ module.exports = withCss(withSass({ ...createPath( '/articles/[page]', x => x.replace('/articles/', ''), - page => ({ page, pageSize: 15 }), - range(1, lastArticlesPage + 1).map(x => `/articles/${x}`), + page => ({ page, pageSize: articlesPageSize }), + range(1, articlesLastPage + 1).map(x => `/articles/${x}`), ), ...createPath( '/next',