import { slug } from 'github-slugger' import { ReleaseNotePatch } from './types' import { HeadingLink } from '@/frame/components/article/HeadingLink' const SectionToLabelMap: Record = { features: 'Features', bugs: 'Bug fixes', known_issues: 'Known issues', security_fixes: 'Security fixes', changes: 'Changes', deprecations: 'Deprecations', backups: 'Backups', errata: 'Errata', closing_down: 'Closing down', retired: 'Retired', } type Props = { patch: ReleaseNotePatch } export function PatchNotes({ patch }: Props) { return ( <> {Object.entries(patch.sections).map(([key, sectionItems]) => { const sectionSlug = `${patch.version}-${key.replaceAll('_', '-')}` return (
{`${patch.version}: ${SectionToLabelMap[key] || 'INVALID SECTION'}`}
) })} ) }