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) {
|
if (copyValue) {
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
className={`cursor-pointer`}
|
className={`cursor-pointer`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
notify(), copy(reference);
|
notify(), copy(reference);
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {IconType} from 'react-icons/lib';
|
import { IconType } from 'react-icons/lib';
|
||||||
import {
|
import {
|
||||||
FaDiscord,
|
FaDiscord,
|
||||||
FaEnvelope,
|
FaEnvelope,
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue