THIS IS A FORK OF NEXTAGRAM WITH THE NEXT VERSION UPDATED TO THE LATEST AND A DYNAMIC ROUTE ADDED.
To make next.js function as expected tge following section of code needed to be disabled
For obvious reasons this isn't the correct approach but it shows that this code could potentially be removed, as routing seemed to still function as expected but without the limitations with dynamic routing.
Sample next app that takes advantage of the routing capabilities. In particular, notice that the photo route can be attached to two distinct components: in one case rendered as a modal, and in another case rendered independently.
$ npm install
$ npm run dev