diff --git a/src/library-authoring/components/ComponentCard.test.tsx b/src/library-authoring/components/ComponentCard.test.tsx index cb800e762e..dae278eba7 100644 --- a/src/library-authoring/components/ComponentCard.test.tsx +++ b/src/library-authoring/components/ComponentCard.test.tsx @@ -34,7 +34,7 @@ const contentHit: ContentHit = { tags: { level0: ['1', '2', '3'], }, - blockType: 'text', + blockType: 'html', created: 1722434322294, modified: 1722434322294, lastPublished: null, diff --git a/src/library-authoring/components/ComponentCard.tsx b/src/library-authoring/components/ComponentCard.tsx index 6978fd6d9d..39a23926fc 100644 --- a/src/library-authoring/components/ComponentCard.tsx +++ b/src/library-authoring/components/ComponentCard.tsx @@ -74,7 +74,11 @@ const ComponentCard = ({ contentHit, blockTypeDisplayName } : ComponentCardProps tags, usageKey, } = contentHit; - const description = formatted?.content?.htmlContent ?? ''; + const description: string = (/* eslint-disable */ + blockType === 'html' ? formatted?.content?.htmlContent : + blockType === 'problem' ? formatted?.content?.capaContent : + undefined + ) ?? '';/* eslint-enable */ const displayName = formatted?.displayName ?? ''; return (