'nextJS catch all routes with statically generated pages doesn't work

Repo here: https://github.com/Chenzo/nextjs-fallback
Example page here: https://chenzo.github.io/nextjs-fallback

I've got a nextJS project set up like this:

/pages  
   /things   
      [thing].js    
      [[...anything]].js 

2 pages are generated from some simple data using the [thing].js template

https://chenzo.github.io/nextjs-fallback/things/onething
https://chenzo.github.io/nextjs-fallback/things/thingtwo

there's a link to a third non-existent page /things/thirdthing that goes to the 404 page. But there's a FOURTH think that goes to /things/thirdthing/what that goes to the [[...anything]].js page.

I understand that the initial call has to land on a page that has the nextjs/react app running but from the homepage, the third link should go to the anything catch-all, yes? why is it only catching the fourth link?

we've got a bunch of "things" prerendered, but then there's the possibility of thousands of "things" that can be linked, and we can just ajax for them, but I'm perhaps going about this wrong?

I want, if staticly generated, use [thing].js if not then use [[...anything]].js

thank you for your time.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source