Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix failing client-side navigation for /api routes #28356

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Sep 15, 2021

Next.js previously fell back to basic URL navigation (opposed to client-side routing) for links to /api routes that were rendered via markdown.

Compare clicking on the "InputBase" link in "Props of the InputBase component are also available." on https://613f2e53d5823400073263e4--material-ui.netlify.app/api/outlined-input/ vs https://deploy-preview-28356--material-ui.netlify.app//api/outlined-input/

I previously thought rewrites was just not working for client-side navigation (#23586). Turns out it's just bugged when the rewrite doesn't have a trailing slash with trailingSlash: true (vercel/next.js#25673, vercel/next.js#25104, vercel/next.js#20984).

We can probably revert most #23586 but I'm not sure how the data-grid api-docs rewrites work so I'm rather not touch it.

@eps1lon eps1lon added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Sep 15, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Sep 15, 2021

No bundle size changes

Generated by 🚫 dangerJS against 33b1bc9

@eps1lon eps1lon marked this pull request as ready for review September 15, 2021 12:17
@eps1lon eps1lon merged commit 5a0e7d9 into mui:master Sep 15, 2021
@eps1lon eps1lon deleted the docs/fix-api-navigation branch September 15, 2021 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants