mirror of
https://github.com/owncast/owncast.git
synced 2024-12-22 17:20:37 +03:00
33 lines
902 B
TypeScript
33 lines
902 B
TypeScript
import Image from 'next/image';
|
|
import { FC } from 'react';
|
|
import { SocialLink } from '../../../interfaces/social-link.model';
|
|
import styles from './SocialLinks.module.scss';
|
|
|
|
export type SocialLinksProps = {
|
|
links: SocialLink[];
|
|
};
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
export const SocialLinks: FC<SocialLinksProps> = ({ links }) => (
|
|
<div className={styles.links}>
|
|
{links.map(link => (
|
|
<a
|
|
key={link.platform}
|
|
href={link.url}
|
|
className={styles.link}
|
|
target="_blank"
|
|
// eslint-disable-next-line react/no-invalid-html-attribute
|
|
rel="noreferrer me"
|
|
>
|
|
<Image
|
|
src={link.icon || '/img/platformlogos/default.svg'}
|
|
alt={link.platform}
|
|
title={link.platform}
|
|
className={styles.link}
|
|
width="30"
|
|
height="30"
|
|
/>
|
|
</a>
|
|
))}
|
|
</div>
|
|
);
|