From 930cda2a0b53ec3c73ad66f1988f8bb62f612b01 Mon Sep 17 00:00:00 2001 From: Dickson Date: Sun, 1 Mar 2026 00:41:51 -0500 Subject: [PATCH] refactor(certs): simplify control-to-framework linking --- components/cert/ControlCard.tsx | 20 + components/cert/cert-framework-map.ts | 1028 +++++++++++++++++++++++++ components/cert/control.css | 55 +- 3 files changed, 1102 insertions(+), 1 deletion(-) create mode 100644 components/cert/cert-framework-map.ts diff --git a/components/cert/ControlCard.tsx b/components/cert/ControlCard.tsx index 0a3377f7..d1d50b73 100644 --- a/components/cert/ControlCard.tsx +++ b/components/cert/ControlCard.tsx @@ -1,6 +1,7 @@ import { memo, useState } from "react"; import "./control.css"; import { Control, ControlData, ControlState } from "./types"; +import { getFrameworkGuidance, getFrameworkGuidanceHref } from "./cert-framework-map"; interface ControlCardProps { control: Control; @@ -35,6 +36,7 @@ export const ControlCard = memo(function ControlCard({ onControlChange }: ControlCardProps) { const [expanded, setExpanded] = useState(false); + const frameworkRefs = getFrameworkGuidance(control.id); const handleCycleState = () => { const newState = nextState[data.state]; @@ -99,6 +101,24 @@ export const ControlCard = memo(function ControlCard({ )} + {frameworkRefs.length > 0 && ( +
+
📖 Related Framework Guidance
+ +
+ )}