DanielOaks / codingtest-birdhouse-admin

Admin app for an innovative new Smart Birdhouse initiative.
https://birdhouse.danieloaks.net/
0 stars 0 forks source link

Remember previous pages by pushing history updates #3

Closed DanielOaks closed 1 year ago

DanielOaks commented 1 year ago

If you go to the third page of birdhouses, then click on a birdhouse, then click Back, you're sent back to page 1 of birdhouses. This doesn't feel as nice as it could.

We should push a page query param into our history, then read that when loading the page for the first time.

DanielOaks commented 1 year ago

Done in the birdhouses list by daab2b78a58ff036fe14c3c51fd2c95505d017b7 – I should refactor this out and use it on the single birdhouse page as well.

DanielOaks commented 1 year ago

Refactored this out into a composable in a46cbe49d5100b32518774608037ca3b622cda20, lots nicer now! And also a little more resilient to Nuxt router glitches. It's now applied to both the list and single birdhouse pages as well, so this can be closed.