Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
remixFill,
remixLine,
} from 'styled-icons'
import iconManifest from 'styled-icons/manifest.json'
import {IconCard} from './IconCard'
interface IconType {
importPath: string
name: string
originalName: string
pack: string
icon: StyledIcon
}
const icons = iconManifest.map(
(icon: any): IconType => {
switch (icon.pack) {
case 'boxicons-logos':
return {...icon, icon: boxiconsLogos[icon.name as keyof typeof boxiconsLogos]}
case 'boxicons-regular':
return {...icon, icon: boxiconsRegular[icon.name as keyof typeof boxiconsRegular]}
case 'boxicons-solid':
return {...icon, icon: boxiconsSolid[icon.name as keyof typeof boxiconsSolid]}
case 'crypto':
return {...icon, icon: crypto[icon.name as keyof typeof crypto]}
case 'evil':
return {...icon, icon: evil[icon.name as keyof typeof evil]}