Refactor TechIcon component for improved readability

- Split conditional check for Font Awesome icon into multiple lines for better clarity.
- Maintained existing functionality while enhancing code maintainability.
This commit is contained in:
Julien Froidefond
2025-08-20 16:24:37 +02:00
parent f74d4d3e87
commit 553ee39728

View File

@@ -233,7 +233,11 @@ export const TechIcon: React.FC<TechIconProps> = ({
} }
// Font Awesome icon (IconDefinition has prefix, iconName, and icon properties) // Font Awesome icon (IconDefinition has prefix, iconName, and icon properties)
if (typeof IconComponent === "object" && "prefix" in IconComponent && "iconName" in IconComponent) { if (
typeof IconComponent === "object" &&
"prefix" in IconComponent &&
"iconName" in IconComponent
) {
return ( return (
<FontAwesomeIcon <FontAwesomeIcon
icon={IconComponent as IconDefinition} icon={IconComponent as IconDefinition}