1import React, { type ReactNode } from 'react'
2import DocVersionBanner from '@theme-original/DocVersionBanner'
3import type DocVersionBannerType from '@theme/DocVersionBanner'
4import type { WrapperProps } from '@docusaurus/types'
5import { useDocsVersion } from '@docusaurus/plugin-content-docs/client'
6import Admonition from '@theme/Admonition'
7
8type Props = WrapperProps<typeof DocVersionBannerType>
9
10export default function DocVersionBannerWrapper(props: Props): ReactNode {
11 const version = useDocsVersion()
12
13 // Show enterprise support message for unmaintained versions
14 const isUnmaintained = version?.banner === 'unmaintained'
15
16 return (
17 <>
18 <DocVersionBanner {...props} />
19 {isUnmaintained && (
20 <Admonition type='tip' title='Enterprise Support Available'>
21 <a href='https://spice.ai/pricing' target='_blank' rel='noopener noreferrer'>
22 Spice.ai Enterprise
23 </a>{' '}
24 provides full support for up to 3 years from the release date.
25 </Admonition>
26 )}
27 </>
28 )
29}
30
1import React, { type ReactNode } from 'react'
2import DocVersionBanner from '@theme-original/DocVersionBanner'
3import type DocVersionBannerType from '@theme/DocVersionBanner'
4import type { WrapperProps } from '@docusaurus/types'
5import { useDocsVersion } from '@docusaurus/plugin-content-docs/client'
6import Admonition from '@theme/Admonition'
7
8type Props = WrapperProps<typeof DocVersionBannerType>
9
10export default function DocVersionBannerWrapper(props: Props): ReactNode {
11 const version = useDocsVersion()
12
13 // Show enterprise support message for unmaintained versions
14 const isUnmaintained = version?.banner === 'unmaintained'
15
16 return (
17 <>
18 <DocVersionBanner {...props} />
19 {isUnmaintained && (
20 <Admonition type='tip' title='Enterprise Support Available'>
21 <a href='https://spice.ai/pricing' target='_blank' rel='noopener noreferrer'>
22 Spice.ai Enterprise
23 </a>{' '}
24 provides full support for up to 3 years from the release date.
25 </Admonition>
26 )}
27 </>
28 )
29}
30