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

{heading}

{(item.schemaChanges || []).map((change, index) => (

{change.title}

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

{change.title}

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

{change.title}

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