bracket spacing

This commit is contained in:
skidoodle 2022-10-22 23:48:17 +02:00
parent 5076ed4efb
commit 83f69ba0d5
5 changed files with 14 additions and 12 deletions

View file

@ -19,14 +19,15 @@ const notify = () => {
}); });
}; };
export const Icon = ({children, reference, copyValue}: Icon) => { export const Icon = ({ children, reference, copyValue }: Icon) => {
if (copyValue) { if (copyValue) {
return ( return (
<a <a
className={`cursor-pointer`} className={`cursor-pointer`}
onClick={() => { onClick={() => {
notify(), copy(reference); notify(), copy(reference);
}}> }}
>
{children} {children}
</a> </a>
); );

View file

@ -1,4 +1,4 @@
import {IconType} from 'react-icons/lib'; import { IconType } from 'react-icons/lib';
import { import {
FaDiscord, FaDiscord,
FaEnvelope, FaEnvelope,

View file

@ -1,9 +1,9 @@
import 'styles/globals.scss'; import 'styles/globals.scss';
import Head from 'next/head'; import Head from 'next/head';
import {AppProps} from 'next/app'; import { AppProps } from 'next/app';
export default function ({Component, pageProps}: AppProps) { export default function ({ Component, pageProps }: AppProps) {
return ( return (
<> <>
<Head> <Head>

View file

@ -1,4 +1,4 @@
import Document, {Html, Head, Main, NextScript} from 'next/document'; import Document, { Html, Head, Main, NextScript } from 'next/document';
class AppDocument extends Document { class AppDocument extends Document {
render() { render() {

View file

@ -4,17 +4,17 @@ import React from 'react';
import useSWR from 'swr'; import useSWR from 'swr';
import FadeIn from 'react-fade-in'; import FadeIn from 'react-fade-in';
import {socials} from 'components/data/socials'; import { socials } from 'components/data/socials';
import {Icon} from 'components/Icon'; import { Icon } from 'components/Icon';
import {Toaster} from 'react-hot-toast'; import { Toaster } from 'react-hot-toast';
import {FaSpotify} from 'react-icons/fa'; import { FaSpotify } from 'react-icons/fa';
import profilePic from 'public/profile.webp'; import profilePic from 'public/profile.webp';
export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json()); export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json());
export default function () { export default function () {
var {data: spotify} = useSWR('/api/spotify', fetcher, { var { data: spotify } = useSWR('/api/spotify', fetcher, {
refreshInterval: 3000, refreshInterval: 3000,
fallbackData: 'loading', fallbackData: 'loading',
}); });
@ -67,7 +67,8 @@ export default function () {
<Icon <Icon
key={social.id} key={social.id}
reference={social.ref} reference={social.ref}
copyValue={social.copyValue}> copyValue={social.copyValue}
>
{React.createElement(social.icon)} {React.createElement(social.icon)}
</Icon> </Icon>
))} ))}