.ditch icon fade-in

This commit is contained in:
skidoodle 2023-04-11 04:51:15 +02:00
parent 9e7e5d00f3
commit 034be34e53

View file

@ -2,7 +2,6 @@ import { socials } from '@/components/data/Socials';
import Link from 'next/link'; import Link from 'next/link';
import toast from 'react-hot-toast'; import toast from 'react-hot-toast';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import FadeIn from 'react-fade-in';
type Icon = { type Icon = {
children: any; children: any;
@ -24,35 +23,29 @@ const notify = () => {
export const Icon = ({ children, reference, copyValue }: Icon) => { export const Icon = ({ children, reference, copyValue }: Icon) => {
if (copyValue) { if (copyValue) {
return ( return (
<FadeIn> <Link
<Link href={''}
href={''} className={`cursor-pointer`}
className={`cursor-pointer`} aria-label={
aria-label={ socials.find((social) => social.ref === reference)?.ariaLabel
socials.find((social) => social.ref === reference)?.ariaLabel }
} onClick={() => {
onClick={() => { notify(), copy(reference);
notify(), copy(reference); }}
}} >
> {children}
{children} </Link>
</Link>
</FadeIn>
); );
} }
return ( return (
<FadeIn> <Link
<Link href={reference}
href={reference} target='_blank'
target='_blank' className={'cursor-pointer'}
className={'cursor-pointer'} aria-label={socials.find((social) => social.ref === reference)?.ariaLabel}
aria-label={ >
socials.find((social) => social.ref === reference)?.ariaLabel {children}
} </Link>
>
{children}
</Link>
</FadeIn>
); );
}; };