From 6c69491c9651563323aeea20ea6bb2955a7d1605 Mon Sep 17 00:00:00 2001 From: CCS Admin Date: Mon, 16 Feb 2026 16:01:30 +0000 Subject: [PATCH] fix: strip quotes from icon names in DynamicIcon Co-Authored-By: Claude Opus 4.6 --- src/components/ui/DynamicIcon.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/ui/DynamicIcon.tsx b/src/components/ui/DynamicIcon.tsx index 2650bbd..78c0ffd 100644 --- a/src/components/ui/DynamicIcon.tsx +++ b/src/components/ui/DynamicIcon.tsx @@ -12,8 +12,11 @@ interface DynamicIconProps { * Names can be kebab-case ("shield-check") or PascalCase ("ShieldCheck"). */ export function DynamicIcon({ name, size = 24, className, strokeWidth = 2 }: DynamicIconProps) { - // Convert kebab-case to PascalCase: "shield-check" → "ShieldCheck" - const pascalName = name + // Strip surrounding quotes if present (e.g. "shield" -> shield) + const cleanName = name.replace(/^["']|["']$/g, '').trim() + + // Convert kebab-case to PascalCase: "shield-check" -> "ShieldCheck" + const pascalName = cleanName .split('-') .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) .join('')