qi-blood-fluids #74

Merged
amit merged 8 commits from qi-blood-fluids into main 2026-10-22 05:58:46 +00:00
1 changed files with 12 additions and 8 deletions
Showing only changes of commit bfb3c361dc - Show all commits

View File

@ -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({
</SectionCard>
) : null}
{clinicalManifestations ? (
{clinicalManifestationItems.length > 0 ? (
<SectionCard title="Clinical Manifestations">
<Paragraphs items={[clinicalManifestations]} />
<BulletList items={clinicalManifestationItems} />
</SectionCard>
) : null}