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 10 additions and 4 deletions
Showing only changes of commit d4bd2d43aa - Show all commits

View File

@ -5,10 +5,11 @@ import type { DetailRendererProps } from "../../types/renderer.types";
import { ContentLinkAttributeSections } from "../shared/ContentLinkAttributeSections"; import { ContentLinkAttributeSections } from "../shared/ContentLinkAttributeSections";
import { Hero } from "../shared/Hero"; import { Hero } from "../shared/Hero";
import { BulletList } from "../shared/BulletList";
import { SectionCard } from "../shared/SectionCard"; import { SectionCard } from "../shared/SectionCard";
import { Paragraphs } from "../shared/Paragraphs"; import { Paragraphs } from "../shared/Paragraphs";
import { ImageGallery } from "../shared/ImageGallery"; import { ImageGallery } from "../shared/ImageGallery";
import { asString } from "../helpers/value"; import { asString, asStringArray } from "../helpers/value";
export function PathogenicFactorsDetailRenderer({ export function PathogenicFactorsDetailRenderer({
content, content,
@ -22,7 +23,12 @@ export function PathogenicFactorsDetailRenderer({
content.title; content.title;
const overview = asString(data.overview); const overview = asString(data.overview);
const clinicalManifestations = asString(data.clinical_manifestations); const clinicalManifestationsRaw =
data.clinical_manifestations ??
data.clinical_manifestation;
const clinicalManifestationItems = asStringArray(clinicalManifestationsRaw).filter(
(item) => item.trim().length > 0,
);
const analysis = asString(data.analysis); const analysis = asString(data.analysis);
const contentText = asString(data.content); const contentText = asString(data.content);
const defaultImage = asString(data["default image"]); const defaultImage = asString(data["default image"]);
@ -56,9 +62,9 @@ export function PathogenicFactorsDetailRenderer({
</SectionCard> </SectionCard>
) : null} ) : null}
{clinicalManifestations ? ( {clinicalManifestationItems.length > 0 ? (
<SectionCard title="Clinical Manifestations"> <SectionCard title="Clinical Manifestations">
<Paragraphs items={[clinicalManifestations]} /> <BulletList items={clinicalManifestationItems} />
</SectionCard> </SectionCard>
) : null} ) : null}