/** @jsx jsx */ import { FaEnvelope as EmailIcon, FaGithub as GithubIcon, FaGlobe as WebsiteIcon, FaTwitter as TwitterIcon } from 'react-icons/fa' import { Flex, IconButton, jsx, Text } from 'theme-ui' import { useSiteMetadata } from '../hooks' export default () => { const { social } = useSiteMetadata() const getIcon = (name: string) => { switch (name.toLowerCase()) { case 'twitter': return case 'email': return case 'github': return case 'website': return default: return { name } } } return ( { social.map(({ name, url }) => { getIcon(name) } ) } ) }