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('')