Skip to content

Commit

Permalink
chore: Add version selector back to release notes pages (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
heatlikeheatwave authored Sep 12, 2024
1 parent 18b7c28 commit f4ef779
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 77 deletions.
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

0 comments on commit f4ef779

Please sign in to comment.