import { icons } from './icons'; import { useTranslations } from 'next-intl'; import Image, { type StaticImageData } from 'next/image'; type ContactType = { readonly href: string; readonly image: StaticImageData; readonly title: string; }; const contacts: ContactType[] = [ { href: 'https://t.me/vchikalkin', image: icons.Telegram, title: 'Telegram', }, { href: 'https://github.com/vchikalkin', image: icons.Github, title: 'GitHub', }, { href: 'mailto:i@vchikalkin.ru', image: icons.Email, title: 'Email', }, ]; export function Contacts() { const t = useTranslations('Contact'); return (

{t('title')}

{contacts.map((contact) => ( ))}
); } function Contact({ href, image, title }: ContactType) { return (
{title}

{title}

); }