SocialLinks.tsx 670 B

123456789101112131415161718192021222324
  1. import { FC } from 'react';
  2. import { SocialLink } from '../../../interfaces/social-link.model';
  3. import styles from './SocialLinks.module.scss';
  4. export type SocialLinksProps = {
  5. links: SocialLink[];
  6. };
  7. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  8. export const SocialLinks: FC<SocialLinksProps> = ({ links }) => (
  9. <div className={styles.links}>
  10. {links.map(link => (
  11. <a
  12. key={link.platform}
  13. href={link.url}
  14. className={styles.link}
  15. target="_blank"
  16. rel="noreferrer"
  17. >
  18. <img src={link.icon} alt={link.platform} title={link.platform} className={styles.link} />
  19. </a>
  20. ))}
  21. </div>
  22. );