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,11 +10,11 @@ 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',
},
});
};
@ -26,8 +26,7 @@ export const Icon = ({ children, reference, copyValue }: Icon) => {
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,
},

View file

@ -1,39 +1,3 @@
const nextSafe = require("next-safe");
module.exports = {
async headers() {
return [
{
source: "/:path*",
headers: nextSafe({
contentTypeOptions: "nosniff",
contentSecurityPolicy: {
"base-uri": "'none'",
"child-src": "'none'",
"connect-src": "'self'",
"default-src": "'self'",
"font-src": "'self'",
"frame-src": "'none'",
"img-src": "'self'",
"frame-ancestors": "'none'",
"manifest-src": "'self'",
"media-src": "'self'",
"object-src": "'none'",
"prefetch-src": "'self'",
"script-src": "'self'",
"style-src": "'self'",
"worker-src": "'self'",
"form-action": "'self'",
reportOnly: false,
},
referrerPolicy: "same-origin",
xssProtection: "1; mode=block",
}),
},
];
},
};
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,

View file

@ -12,7 +12,6 @@
"aws-sdk": "^2.1237.0",
"axios": "^1.1.3",
"next": "12.3.1",
"next-safe": "^3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-fade-in": "^2.0.1",

View file

@ -1,7 +1,7 @@
import "styles/globals.scss";
import Head from "next/head";
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) {
return (

View file

@ -1,17 +1,17 @@
import Document, { Html, Head, Main, NextScript } from "next/document";
import Document, {Html, Head, Main, NextScript} from 'next/document';
class AppDocument extends Document {
render() {
return (
<Html lang="en">
<Html lang='en'>
<Head>
<link rel="preconnect" href="https://vitals.vercel-insights.com" />
<meta name="title" content="albert" />
<meta name="og:title" content="albert" />
<meta name="description" content="system administrator" />
<meta name="og:description" content="system administrator" />
<meta name="theme-color" content="#000000" />
<meta property="og:image" content="/favicon.ico" />
<link rel='preconnect' href='https://vitals.vercel-insights.com' />
<meta name='title' content='albert' />
<meta name='og:title' content='albert' />
<meta name='description' content='system administrator' />
<meta name='og:description' content='system administrator' />
<meta name='theme-color' content='#000000' />
<meta property='og:image' content='/favicon.ico' />
</Head>
<body>
<Main />

View file

@ -1,5 +1,4 @@
import { NextApiRequest, NextApiResponse } from "next";
import aws from "aws-sdk";
const { BUCKET, ACCESS_KEY, SECRET_KEY, ENDPOINT, REGION } = process.env;
@ -40,7 +39,7 @@ export default async function (req: NextApiRequest, res: NextApiResponse) {
}
}
res.setHeader(
"Cache-Control",
'Cache-Control',
"public, s-maxage=10, stale-while-revalidate=59"
);
res.json({ object: objects, size: Number(size.toFixed(2)) });

View file

@ -1,74 +1,73 @@
import Image from "next/image";
import Link from "next/link";
import React from "react";
import useSWR from "swr";
import FadeIn from "react-fade-in";
import Image from 'next/image';
import Link from 'next/link';
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";
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",
fallbackData: 'loading',
});
return (
<FadeIn>
<div className="px-8 2xl:translate-y-2/3 translate-y-1/3 m-auto max-w-4xl">
<div className="flex flex-col justify-center items-center">
<div className='px-8 2xl:translate-y-2/3 translate-y-1/3 m-auto max-w-4xl'>
<div className='flex flex-col justify-center items-center'>
<Image
src={profilePic}
alt="Profile Picture"
className="rounded-full text-center"
alt='Profile Picture'
className='rounded-full text-center'
height={150}
width={150}
/>
<h1 className="text-4xl font-bold mt-1">albert</h1>
<h1 className='text-4xl font-bold mt-1'>albert</h1>
<p className="text-[#9ca3af] text-xl flex flex-wrap items-center justify-center whitespace-pre-wrap">
<p className='text-[#9ca3af] text-xl flex flex-wrap items-center justify-center whitespace-pre-wrap'>
{Math.floor(
(new Date().getTime() - new Date("2004-07-22").getTime()) /
(new Date().getTime() - new Date('2004-07-22').getTime()) /
(1000 * 60 * 60 * 24 * 365.25)
)}
yrs old <b className="font-semibold">system administrator</b> and
yrs old <b className='font-semibold'>system administrator</b> and
student from Hungary
</p>
</div>
<hr className="border-t-[#727277] w-4/5 md:w-2/5 m-auto mt-5 md:mt-8" />
<hr className='border-t-[#727277] w-4/5 md:w-2/5 m-auto mt-5 md:mt-8' />
<div className="mt-3 flex justify-center items-center">
<FaSpotify className="text-[#32a866]" />
<p className="font-semibold pl-1">
<div className='mt-3 flex justify-center items-center'>
<FaSpotify className='text-[#32a866]' />
<p className='font-semibold pl-1'>
Listening to
{spotify.song ? (
<Link href={`${spotify.song.url}`}>
<a target="_blank" className="text-[#32a866]">
{" "}
<a target='_blank' className='text-[#32a866]'>
{' '}
{spotify.song.title}
</a>
</Link>
) : (
<a className="text-[#32a866]"> nothing</a>
<a className='text-[#32a866]'> nothing</a>
)}
</p>
</div>
<div className="flex justify-between items-center text-3xl mt-11 md:mt-16 max-w-sm m-auto">
<div className='flex justify-between items-center text-3xl mt-11 md:mt-16 max-w-sm m-auto'>
{socials.map((social) => (
<Icon
key={social.id}
reference={social.ref}
copyValue={social.copyValue}
>
copyValue={social.copyValue}>
{React.createElement(social.icon)}
</Icon>
))}

View file

@ -1,8 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {},

View file

@ -765,11 +765,6 @@ nanoid@^3.3.4:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
next-safe@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/next-safe/-/next-safe-3.2.1.tgz#76bb6deb2b11a39318e5b962a6da4e57584bf77f"
integrity sha512-2BBbnendVIlbUjrvV/N6cotuba71i2IIczo0dqmpZu9oSl2PlN6hYML22fidcqXZILwghyXULIy4lxyAgPz+Xg==
next@12.3.1:
version "12.3.1"
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"