diff --git a/src/features/content/renderers/details/FourLevelsDetailRenderer.tsx b/src/features/content/renderers/details/FourLevelsDetailRenderer.tsx index e092583..a236901 100644 --- a/src/features/content/renderers/details/FourLevelsDetailRenderer.tsx +++ b/src/features/content/renderers/details/FourLevelsDetailRenderer.tsx @@ -5,9 +5,10 @@ import type { DetailRendererProps } from "../../types/renderer.types"; import { ContentLinkAttributeSections } from "../shared/ContentLinkAttributeSections"; import { Hero } from "../shared/Hero"; -import { SectionCard } from "../shared/SectionCard"; +import { BulletList } from "../shared/BulletList"; import { Paragraphs } from "../shared/Paragraphs"; -import { asString } from "../helpers/value"; +import { SectionCard } from "../shared/SectionCard"; +import { asString, asStringArray } from "../helpers/value"; export function FourLevelsDetailRenderer({ content, @@ -21,10 +22,13 @@ export function FourLevelsDetailRenderer({ content.title; const overview = asString(data.overview); - const clinicalManifestations = - asString(data.clinical_manifestation) || - asString(data.clinical_manifestations) || - asString(data.clinical_menifestation); + const clinicalManifestationsRaw = + data.clinical_manifestation ?? + data.clinical_manifestations ?? + data.clinical_menifestation; + const clinicalManifestationItems = asStringArray(clinicalManifestationsRaw).filter( + (item) => item.trim().length > 0, + ); const tongue = asString(data.tongue); const pulse = asString(data.pulse); const pathology = asString(data.pathology); @@ -48,9 +52,9 @@ export function FourLevelsDetailRenderer({ ) : null} - {clinicalManifestations ? ( + {clinicalManifestationItems.length > 0 ? ( - + ) : null}