Closed IshaanPota closed 5 years ago
I think this broke something in pagination: If I put an empty input in pagination, it should reset to 1 and go back to the first page. I checked tanzeela/blog-cleanup and it still does that. In this fix, it shows up like this:
There's another bug introduced: If I search a post, e.g. "joji", and try to change pagination, it shouldn't let me go to a nonexistent page. I checked with tanzeela/blog-cleanup, and it remains at "1" when I put i page that's too large. On this PR, it tries to go to the page and the joji post disappears.
Types of changes
Purpose
Makes sure the next button does not light up when there are no more posts
Approach
The nextIsValid() function only returns true if there are posts left
Learning
Testing
Screenshot(s)
Checklist
master
without error.Link to Issue
https://github.com/uclaradio/uclaradio.com/issues/298
Platform
Operating System:
Node Version:
Further Comments