diff --git a/src/lib/components/icon/Icon.component.tsx b/src/lib/components/icon/Icon.component.tsx index 99478e7fe7..d05ee99a43 100644 --- a/src/lib/components/icon/Icon.component.tsx +++ b/src/lib/components/icon/Icon.component.tsx @@ -162,36 +162,6 @@ const DelayedFallback = ({ return {show && children}; }; -function getLazyStyledIcon(iconInfo: string) { - const [iconType, iconClass] = iconInfo.split(' '); - return React.lazy(async () => { - try { - const fontAwesomeType = - iconType === 'far' ? 'free-regular-svg-icons' : 'free-solid-svg-icons'; - const icon = await import( - `@fortawesome/${fontAwesomeType}/${iconClass}.js` - ); - return { - default: ({ name, color, size, ariaLabel, ...rest }) => ( - - ), - }; - } catch { - return { - default: ({ name, ariaLabel }) => ( - - ), - }; - } - }); -} - export const IconWrapper = styled.div<{ size: SizeProp }>` ${(props) => { const brand = getTheme(props);