Merge pull request #352 from SayakaOno/fix-path

remove an unnecessary slash for nextPagePath for categories pages
This commit is contained in:
Alexander Shelepenok 2019-08-12 11:46:21 +03:00 committed by GitHub
commit 6e787059ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ module.exports = async (graphql, actions) => {
postsLimit: postsPerPage, postsLimit: postsPerPage,
postsOffset: i * postsPerPage, postsOffset: i * postsPerPage,
prevPagePath: i <= 1 ? categorySlug : `${categorySlug}/page/${i - 1}`, prevPagePath: i <= 1 ? categorySlug : `${categorySlug}/page/${i - 1}`,
nextPagePath: `/${categorySlug}/page/${i + 1}`, nextPagePath: `${categorySlug}/page/${i + 1}`,
hasPrevPage: i !== 0, hasPrevPage: i !== 0,
hasNextPage: i !== numPages - 1 hasNextPage: i !== numPages - 1
} }