import { useTheme } from 'next-themes' import Image from 'next/image' import { useMemo } from 'react' import { skills } from './skills' export interface SkillComponentProps { skill: string } export const SkillComponent: React.FC = (props) => { const { skill } = props const skillProperties = skills[skill] const { theme } = useTheme() const image = useMemo(() => { if (typeof skillProperties.image !== 'string') { return skillProperties.image[theme ?? 'light'] } return skillProperties.image }, [skillProperties, theme]) return (
{skill}

{skill}

) }