mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
bracket spacing
This commit is contained in:
parent
5076ed4efb
commit
83f69ba0d5
5 changed files with 14 additions and 12 deletions
|
@ -19,14 +19,15 @@ const notify = () => {
|
|||
});
|
||||
};
|
||||
|
||||
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>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {IconType} from 'react-icons/lib';
|
||||
import { IconType } from 'react-icons/lib';
|
||||
import {
|
||||
FaDiscord,
|
||||
FaEnvelope,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import 'styles/globals.scss';
|
||||
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 (
|
||||
<>
|
||||
<Head>
|
||||
|
|
|
@ -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 {
|
||||
render() {
|
||||
|
|
|
@ -4,17 +4,17 @@ import React from 'react';
|
|||
import useSWR from 'swr';
|
||||
import FadeIn from 'react-fade-in';
|
||||
|
||||
import {socials} from 'components/data/socials';
|
||||
import {Icon} from 'components/Icon';
|
||||
import {Toaster} from 'react-hot-toast';
|
||||
import {FaSpotify} from 'react-icons/fa';
|
||||
import { socials } from 'components/data/socials';
|
||||
import { Icon } from 'components/Icon';
|
||||
import { Toaster } from 'react-hot-toast';
|
||||
import { FaSpotify } from 'react-icons/fa';
|
||||
|
||||
import profilePic from 'public/profile.webp';
|
||||
|
||||
export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json());
|
||||
|
||||
export default function () {
|
||||
var {data: spotify} = useSWR('/api/spotify', fetcher, {
|
||||
var { data: spotify } = useSWR('/api/spotify', fetcher, {
|
||||
refreshInterval: 3000,
|
||||
fallbackData: 'loading',
|
||||
});
|
||||
|
@ -67,7 +67,8 @@ export default function () {
|
|||
<Icon
|
||||
key={social.id}
|
||||
reference={social.ref}
|
||||
copyValue={social.copyValue}>
|
||||
copyValue={social.copyValue}
|
||||
>
|
||||
{React.createElement(social.icon)}
|
||||
</Icon>
|
||||
))}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue