gatsby-starter-lumen icon indicating copy to clipboard operation
gatsby-starter-lumen copied to clipboard

Pagination for the blog doesn't calculate number of posts correctly

Open Mastermindzh opened this issue 1 year ago • 0 comments

Describe the bug The postsquery retrieves both posts and pages so when you count them and use that count for pagination you end up with extra empty pages at the end. (you will see that "next" is available, it will show an empty page if you click it)

image image

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo / npm install / etc
  2. Create a few fake pages: image
  3. npm start
  4. Open the homepage and just click "next"
  5. See error

Expected behavior Pages should be ignored in the postsQuery

Screenshots See above

Additional context I will make a PR correcting this but the CODE_OF_CONDUCT implores me to create an issue ;)

Mastermindzh avatar Sep 17 '22 21:09 Mastermindzh