import type { FunctionalComponent, JSX } from 'preact'; import type { SVGProps } from 'preact/compat'; import { Link } from '.'; import { Github, Instagram, Mail, TwitterX } from './icons'; import data from '../data/social-links.json'; type IconComponent = FunctionalComponent>; type IconMap = { [key: string]: IconComponent }; const renderIcon = (iconName: string): JSX.Element => { const iconMap: IconMap = { mail: Mail, twitter: TwitterX, github: Github, instagram: Instagram, }; const IconComponent = iconMap[iconName]; return ; }; export const SocialLinks: FunctionalComponent = () => ( );