michael-s-molina commented on code in PR #32880:
URL: https://github.com/apache/superset/pull/32880#discussion_r2018963637


##########
superset-frontend/src/components/Icons/AntdEnhanced.tsx:
##########
@@ -205,19 +206,25 @@ const AntdIcons = {
   FilterOutlined,
   UnorderedListOutlined,
   WarningOutlined,
-};
+} as const;
 
-const AntdEnhancedIcons = Object.keys(AntdIcons)
-  .filter(k => !k.includes('TwoTone'))
-  .map(k => ({
-    [k]: (props: IconType) => (
-      <BaseIconComponent
-        component={AntdIcons[k as keyof typeof AntdIcons]}
-        fileName={k}
-        {...props}
-      />
-    ),
-  }))
-  .reduce((l, r) => ({ ...l, ...r }));
+type AntdIconNames = keyof typeof AntdIcons;
 
-export default AntdEnhancedIcons;
+export const antdEnhancedIcons: Record<
+  AntdIconNames,
+  FC<IconType>
+> = Object.keys(AntdIcons)
+  .filter(k => !k.includes('TwoTone')) // Filter unwanted keys if needed

Review Comment:
   Can we create a constant called `EXCLUDED_ICONS` or something?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to