import React from 'react' import cx from 'classnames' import GithubSlugger from 'github-slugger' import { HeadingLink } from '@/frame/components/article/HeadingLink' import { ChangelogItemT } from './types' import styles from '@/frame/components/ui/MarkdownContent/MarkdownContent.module.scss' type Props = { changelogItems: ChangelogItemT[] } export function Changelog({ changelogItems }: Props) { const slugger = new GithubSlugger() const changes = changelogItems.map((item, index) => { const heading = `Schema changes for ${item.date}` const slug = slugger.slug(heading) return (
{heading} {(item.schemaChanges || []).map((change, changeIndex) => (

{change.title}

))} {(item.previewChanges || []).map((change, changeIndex) => (

{change.title}

))} {(item.upcomingChanges || []).map((change, changeIndex) => (

{change.title}

{change.changes.map((changeItem) => (
  • ))} ))}
  • ) }) return
    {changes}
    }