single quotes

This commit is contained in:
skidoodle 2022-10-22 23:43:17 +02:00
parent 9b88d48431
commit 5076ed4efb
10 changed files with 62 additions and 107 deletions

View file

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

View file

@ -1,11 +1,11 @@
import { IconType } from "react-icons/lib";
import {IconType} from 'react-icons/lib';
import {
FaDiscord,
FaEnvelope,
FaGithub,
FaInstagram,
FaSteam,
} from "react-icons/fa";
} from 'react-icons/fa';
type Socials = {
id: number;
@ -17,28 +17,28 @@ type Socials = {
export const socials: Array<Socials> = [
{
id: 1,
ref: "https://github.com/skidoodle",
ref: 'https://github.com/skidoodle',
icon: FaGithub,
},
{
id: 2,
ref: "https://steamcommunity.com/id/_albert",
ref: 'https://steamcommunity.com/id/_albert',
icon: FaSteam,
},
{
id: 3,
ref: "contact@albert.lol",
ref: 'contact@albert.lol',
icon: FaEnvelope,
copyValue: true,
},
{
id: 4,
ref: "https://www.instagram.com/albertadam_/",
ref: 'https://www.instagram.com/albertadam_/',
icon: FaInstagram,
},
{
id: 5,
ref: "albert#8838",
ref: 'albert#8838',
icon: FaDiscord,
copyValue: true,
},