Initial commit

This commit is contained in:
skidoodle 2023-02-14 23:10:01 +01:00
commit d1b8e8f676
26 changed files with 3283 additions and 0 deletions

42
components/Icon.tsx Normal file
View file

@ -0,0 +1,42 @@
import Link from 'next/link';
import toast from 'react-hot-toast';
import copy from 'copy-to-clipboard';
type Icon = {
children: any;
reference: string;
copyValue?: boolean;
};
const notify = () => {
toast.remove(),
toast.success('Copied to clipboard', {
style: {
background: '#0f1012',
color: '#fff',
fontSize: '1em',
},
});
};
export const Icon = ({ children, reference, copyValue }: Icon) => {
if (copyValue) {
return (
<Link
href={''}
className={`cursor-pointer`}
onClick={() => {
notify(), copy(reference);
}}
>
{children}
</Link>
);
}
return (
<Link href={reference} target='_blank' className={'cursor-pointer'}>
{children}
</Link>
);
};