fix: the check description is now rendered with markdown

Signed-off-by: David Weber <david.weber@w3tec.ch>
This commit is contained in:
David Weber
2023-05-12 19:47:05 +02:00
parent 08bd36717d
commit c03307ded3
4 changed files with 93 additions and 4 deletions
@@ -17,10 +17,11 @@
import React from 'react';
import { useApi } from '@backstage/core-plugin-api';
import { makeStyles, List, ListItem, ListItemText } from '@material-ui/core';
import { techInsightsApiRef } from '../../api/TechInsightsApi';
import { techInsightsApiRef } from '../../api';
import { CheckResult } from '@backstage/plugin-tech-insights-common';
import { BackstageTheme } from '@backstage/theme';
import { Alert } from '@material-ui/lab';
import { MarkdownContent } from '@backstage/core-components';
const useStyles = makeStyles((theme: BackstageTheme) => ({
listItemText: {
@@ -49,7 +50,11 @@ export const ScorecardsList = (props: { checkResults: CheckResult[] }) => {
key={index}
primary={result.check.name}
secondary={
description ? description(result) : result.check.description
description ? (
description(result)
) : (
<MarkdownContent content={result.check.description} />
)
}
className={classes.listItemText}
/>