diff --git a/web/components/ui/SocialLinks/SocialLinks.tsx b/web/components/ui/SocialLinks/SocialLinks.tsx index 731797370..df9d60cce 100644 --- a/web/components/ui/SocialLinks/SocialLinks.tsx +++ b/web/components/ui/SocialLinks/SocialLinks.tsx @@ -1,31 +1,50 @@ import Image from 'next/image'; import { FC } from 'react'; +import { ErrorBoundary } from 'react-error-boundary'; import { SocialLink } from '../../../interfaces/social-link.model'; +import { ComponentError } from '../ComponentError/ComponentError'; import styles from './SocialLinks.module.scss'; export type SocialLinksProps = { links: SocialLink[]; }; -export const SocialLinks: FC = ({ links }) => ( -
- {links.map(link => ( - - {link.platform} = ({ links }) => { + if (!links?.length) { + return null; + } + + return ( + ( + - - ))} -
-); + )} + > +
+ {links?.map(link => ( + + {link.platform} + + ))} +
+ + ); +};