.minor tweaks

This commit is contained in:
skidoodle
2023-04-11 04:48:30 +02:00
parent da6a607b5d
commit 9e7e5d00f3
2 changed files with 56 additions and 47 deletions
+28 -21
View File
@@ -1,7 +1,8 @@
import { socials } from '@/components/data/Socials';
import Link from 'next/link';
import toast from 'react-hot-toast';
import copy from 'copy-to-clipboard';
import { socials } from '@/components/data/Socials';
import FadeIn from 'react-fade-in';
type Icon = {
children: any;
@@ -23,29 +24,35 @@ const notify = () => {
export const Icon = ({ children, reference, copyValue }: Icon) => {
if (copyValue) {
return (
<Link
href={''}
className={`cursor-pointer`}
aria-label={
socials.find((social) => social.ref === reference)?.ariaLabel
}
onClick={() => {
notify(), copy(reference);
}}
>
{children}
</Link>
<FadeIn>
<Link
href={''}
className={`cursor-pointer`}
aria-label={
socials.find((social) => social.ref === reference)?.ariaLabel
}
onClick={() => {
notify(), copy(reference);
}}
>
{children}
</Link>
</FadeIn>
);
}
return (
<Link
href={reference}
target='_blank'
className={'cursor-pointer'}
aria-label={socials.find((social) => social.ref === reference)?.ariaLabel}
>
{children}
</Link>
<FadeIn>
<Link
href={reference}
target='_blank'
className={'cursor-pointer'}
aria-label={
socials.find((social) => social.ref === reference)?.ariaLabel
}
>
{children}
</Link>
</FadeIn>
);
};