[BUG] Multi-level routing does not work under next.js
See original GitHub issueDescribe the bug Due to the way next.js routing is setup: [resource]->[action]->[id], multi-level routing breaks when trying to access a resource under a parent resource
To Reproduce Steps to reproduce the behavior:
- Clone and run
yarn dev
on https://github.com/smparekh/refine-test - Click on βCMSβ
- Click on βPostsβ
- Posts will not be displayed as expected
Expected behavior When routing to a resource under a parentResource it should still handle it the same way as a top-level menu item
Screenshots WITH POSTS UNDER CMS:
WITH POSTS AT TOPLEVEL:
Desktop (please complete the following information):
- OS: macOS
- Browser: Firefox
- Version:
- Used: supabase, next.js, antd, custom layout
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Used dataProvider [e.g. custom, Strapi, Airtable]
Additional context
@pankod/refine-antd@3.12.2
β ββ @ant-design/icons@^4.5.0
β ββ @pankod/refine-core@^3.12.1
β ββ antd@^4.17.1
β ββ dayjs@^1.10.7
β ββ react-markdown@^6.0.1
β ββ react-query@^3.19.2
β ββ remark-gfm@^1.0.0
β ββ sunflower-antd@1.0.0-beta.3
β ββ tslib@^2.3.1
ββ @pankod/refine-core@3.12.1
β ββ export-to-csv-fix-source-map@^0.2.1
β ββ humanize-string@^2.1.0
β ββ lodash-es@^4.17.21
β ββ lodash@^4.17.21
β ββ papaparse@^5.3.0
β ββ pluralize@^8.0.0
β ββ qs@^6.10.1
β ββ react-query@^3.19.2
β ββ tslib@^2.3.1
ββ @pankod/refine-nextjs-router@3.12.1
β ββ @pankod/refine-core@^3.12.1
β ββ qs@^6.10.1
ββ @pankod/refine-supabase@3.12.1
β ββ @pankod/refine-core@^3.12.1
β ββ @supabase/supabase-js@^1.22.4
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
2 levels nested routing in nextjs - Stack Overflow
I want dynamic routing at two levels. E.g.: {siteroot}/dynamicPage; {siteroot}/dynamicUrlSection/dynamicPage. My folder structure is: /Β ...
Read more >How to implement redirects in Next.js - LogRocket Blog
Redirects enable users to transfer an executed URL to a new URL to reroute an incoming request from one path to another.
Read more >Routing: Introduction - Next.js
Next.js has a file-system based router built on the concept of pages. When a file is added to the pages directory, it's automatically...
Read more >Shallow Routing - Next.js
When shallow routing is used with middleware it will not ensure the new page matches the current page like previously done without middleware....
Read more >Advanced Features: Internationalized Routing - Next.js
js has built-in support for internationalized (i18n) routing since v10.0.0 . You can provide a list of locales, the default locale, and domain-specific...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @smparekh, Thank you for reporting a bug. I fixed your issue. Can you try again?
Hey @smparekh , Weβve updated superplate. Thank you!