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

chore: Add version selector back to release notes pages #2570

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions src/lib/__tests__/is-release-notes-page.test.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/lib/docs/is-release-notes-page.ts

This file was deleted.

7 changes: 1 addition & 6 deletions src/views/docs-view/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import { getDeployPreviewLoader } from './utils/get-deploy-preview-loader'
import { getCustomLayout } from './utils/get-custom-layout'
import type { DocsViewPropOptions } from './utils/get-root-docs-path-generation-functions'
import { DocsViewProps } from './types'
import { isReleaseNotesPage } from 'lib/docs/is-release-notes-page'

/**
* Returns static generation functions which can be exported from a page to fetch docs data
Expand Down Expand Up @@ -453,11 +452,7 @@ export function getStaticGenerationFunctions<
},
projectName: projectName || null,
versions:
!hideVersionSelector &&
!isReleaseNotesPage(currentPathUnderProduct) && // toggle version dropdown
hasMeaningfulVersions
? validVersions
: null,
!hideVersionSelector && hasMeaningfulVersions ? versions : null,
}

return {
Expand Down
Loading