diff --git a/src/scenes/ProgressReports/PnpValidation/PnPExtractionProblems.tsx b/src/scenes/ProgressReports/PnpValidation/PnPExtractionProblems.tsx index f58d65916..460bd6081 100644 --- a/src/scenes/ProgressReports/PnpValidation/PnPExtractionProblems.tsx +++ b/src/scenes/ProgressReports/PnpValidation/PnPExtractionProblems.tsx @@ -5,7 +5,7 @@ import { SimpleTreeView } from '@mui/x-tree-view/SimpleTreeView'; import { TreeItem2 as TreeItem } from '@mui/x-tree-view/TreeItem2'; import { cmpBy, groupToMapBy } from '@seedcompany/common'; import Markdown, { MarkdownToJSX } from 'markdown-to-jsx'; -import { memo, useState } from 'react'; +import { Fragment, memo, useState } from 'react'; import { PnpProblemSeverity as Severity } from '~/api/schema.graphql'; import { InlineCode } from '../../../components/Debug'; import { FormattedNumber } from '../../../components/Formatters'; @@ -17,6 +17,8 @@ import { const priority = ['Error', 'Warning', 'Notice'] satisfies Severity[]; +const TREE_ITEM_CHILDREN_INDENTATION = 48; + export const PnPExtractionProblems = memo(function PnPExtractionProblems({ result, engagement, @@ -62,7 +64,9 @@ export const PnPExtractionProblems = memo(function PnPExtractionProblems({ planned goals. )} - + @@ -99,27 +103,33 @@ export const ProblemList = memo(function ProblemList({ ); } else { - return problems.map((problem) => ( - - {groupIndex === 1 && } -
- {problem.message} - {problem.documentation && ( - - For more information see the PnP Troubleshooting{' '} - - Guide - - - )} -
- - } - /> + return problems.map((problem, idx) => ( + + {idx === 0 && problem.documentation && ( + + For more information see the PnP Troubleshooting{' '} + + Guide + + + } + /> + )} + + {groupIndex === 1 && } +
+ {problem.message} +
+ + } + /> +
)); } }