import React from "react"; interface AboutMarkdownSectionProps { content: string; title?: string; ctaHref?: string; ctaLabel?: string; } export function AboutMarkdownSection({ content, title = "关于衡感智能", ctaHref, ctaLabel, }: AboutMarkdownSectionProps) { if (!content) { return null; } const rawParagraphs = content .split(/\r?\n+/) .map((paragraph) => paragraph.trim()) .filter(Boolean); const paragraphs = rawParagraphs.filter( (paragraph, index) => rawParagraphs.indexOf(paragraph) === index, ); if (paragraphs.length === 0) { return null; } const [headline, ...rest] = paragraphs; const coreIndex = rest.findIndex((item) => item.startsWith("核心定位")); const coreLine = coreIndex >= 0 ? rest.splice(coreIndex, 1).at(0) ?? undefined : undefined; return (

{title}

{headline}

{rest.map((paragraph, index) => (

{paragraph}

))}
{coreLine && (
Vision

{coreLine}

通过 AI 感知、智能硬件与数字孪生协同,让城市结构具备持续演化的自我防御能力,构建一体化的安全决策闭环。

)}
{ctaHref && (
{ctaLabel ?? "下载了解方案"} AI City Safety Initiative
)}
); }