fix(docs): hide API tab when apiDocs are not available #8462
+9
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The Tabs documentation shows an API tab even though Tabs does not provide API documentation.
Clicking this tab navigates to a non-existent API route, resulting in a 404 on the docs site.
Impact
Users end up on a broken page, which is confusing and gives the impression that the documentation is incomplete or incorrect.
Fixes
The API tab is now rendered only when API documentation is available (apiDocs is provided).
This prevents navigation to dead API routes while keeping existing behavior unchanged for components that do expose API docs.
Approach Used
I reviewed how the docs UI decides when to render the API tab and added a small conditional check so it only appears when API data exists. This keeps the fix minimal, safe, and limited to documentation logic.
Fixes #8388 ([v11] docs: API page for Tabs component in the docs returns a 404)