import { useState } from 'react' import cx from 'classnames' import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, LinkExternalIcon, } from '@primer/octicons-react' import { useMainContext } from 'components/context/MainContext' import dayjs from 'dayjs' import { Link } from 'components/Link' import { GHESReleaseNotesContextT } from './types' import { GHESReleaseNotePatch } from './GHESReleaseNotePatch' type Props = { context: GHESReleaseNotesContextT } export function GHESReleaseNotes({ context }: Props) { const { currentLanguage, currentProduct } = useMainContext() const [focusedPatch, setFocusedPatch] = useState('') const { prevRelease, nextRelease, latestPatch, latestRelease, currentVersion, releaseNotes, releases, message, } = context return (
{prevRelease ? ( {prevRelease} ) : (
)}

{currentVersion.planTitle} {currentVersion.currentRelease} release notes

{nextRelease ? ( {nextRelease} ) : (
)}
{releaseNotes.map((patch) => { return ( { setFocusedPatch(patch.version) }} /> ) })}
) }