APMG / apm-titan

A number of React components that can be used as a starting point to create APM websites
MIT License
0 stars 0 forks source link

Pagination: Make page 1 the plan URL rather than end with /1 #77

Closed talia-storymaker closed 2 months ago

talia-storymaker commented 2 months ago

I change the as to href for the Prev button because otherwise, Talking Sense specifically breaks because the Talking Sense page 1 isn't a normal collection page, a fact which is currently unique to it. (It breaks in that, when the Prev button is clicked when you're on page 2, the URL in the bar becomes /talking-sense, but the page is a 404.) I don't really know why we're using as to begin with, so I can't guarantee this won't break other sites - I just tested on MPR News.

ghankerson commented 2 months ago

as parameter was needed in an older version of next js. There are some failing tests here https://app.circleci.com/pipelines/github/APMG/apm-titan/342/workflows/c35d0a57-7ed9-4114-96bc-d65e7344f2c0/jobs/323. I think you should be able to just change the expect statements to not have /1. Then don't forget to increment the version in package.json