SEO Friendly Routing URLs with Next.js

Is it possible to get SEO friendly URLs (sandbox) to work with next.js?

Algolia’s provided next.js boilerplate (sandbox) doesn’t have this implemented.

I’m trying to get this to work myself but am having issues, probably due to not fully understanding next/router. I’m hoping someone else has already solved/built this or can identify what I’m doing wrong here: sandbox