import type { CellInfo } from '@/utils/practice' import { knowledgeAreaMap, processMap } from '@/data' interface HintInfoProps { currentCell: CellInfo | undefined } export function HintInfo({ currentCell }: HintInfoProps) { if (!currentCell) return null if (currentCell.type === 'knowledge-area') { const ka = knowledgeAreaMap.get(currentCell.knowledgeAreaId) if (!ka?.tailoringFactors || ka.tailoringFactors.length === 0) { return (
暂无裁剪因素信息
) } return (

敏捷裁剪因素

{ka.tailoringFactors.slice(0, 2).map((factor, index) => (
{factor.title}: {factor.description}
))} {ka.tailoringFactors.length > 2 && (
+{ka.tailoringFactors.length - 2} 个因素...
)}
) } else { const process = processMap.get(currentCell.processId!) const purpose = process?.purpose return (

主要作用

{purpose ? (

{purpose}

) : (

暂无主要作用说明

)}
) } }