({ schema }: Props)
| 12 | const slugger = new GithubSlugger() |
| 13 | |
| 14 | export function BreakingChanges({ schema }: Props) { |
| 15 | const changes = Object.keys(schema).map((date) => { |
| 16 | const items = schema[date] |
| 17 | const heading = `Changes scheduled for ${date}` |
| 18 | const slug = slugger.slug(heading) |
| 19 | |
| 20 | return ( |
| 21 | <div className={cx(styles.markdownBody, styles.automatedPages)} key={date}> |
| 22 | <h2 id={slug}> |
| 23 | <LinkIconHeading slug={slug} /> |
| 24 | {heading} |
| 25 | </h2> |
| 26 | {items.map((item) => { |
| 27 | const criticalityStyles = |
| 28 | item.criticality === 'breaking' |
| 29 | ? 'color-border-danger color-bg-danger' |
| 30 | : 'color-border-accent-emphasis color-bg-accent' |
| 31 | const criticality = item.criticality === 'breaking' ? 'Breaking' : 'Dangerous' |
| 32 | |
| 33 | return ( |
| 34 | <ul key={item.location}> |
| 35 | <li> |
| 36 | <span className={cx(criticalityStyles, 'border rounded-1 m-1 p-1')}> |
| 37 | {criticality} |
| 38 | </span>{' '} |
| 39 | A change will be made to <code>{item.location}</code>. |
| 40 | <p> |
| 41 | <b>Description: </b> |
| 42 | <span dangerouslySetInnerHTML={{ __html: item.description }} /> |
| 43 | </p> |
| 44 | <p> |
| 45 | <b>Reason: </b> <span dangerouslySetInnerHTML={{ __html: item.reason }} /> |
| 46 | </p> |
| 47 | </li> |
| 48 | </ul> |
| 49 | ) |
| 50 | })} |
| 51 | </div> |
| 52 | ) |
| 53 | }) |
| 54 | |
| 55 | return <div>{changes}</div> |
| 56 | } |
nothing calls this directly
no outgoing calls
no test coverage detected