diff --git a/.dockerignore b/.dockerignore index 76bad3b..f8ee828 100644 --- a/.dockerignore +++ b/.dockerignore @@ -35,4 +35,6 @@ yarn-error.log* .env.test.local .env.production.local -secrets.txt \ No newline at end of file +secrets.txt + +.pnpm-store \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ebe51d3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/.gitignore b/.gitignore index dd6d93c..f8ee828 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ yarn-error.log* .env.production.local secrets.txt + +.pnpm-store \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js index 2c63c08..2e7c768 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,2 +1,6 @@ -{ -} +module.exports = { + singleQuote: true, + trailingCommas: 'all', + bracketSpacing: true, + bracketSameLine: true, +}; diff --git a/components/Card.tsx b/components/Card.tsx index 143681e..c7f127a 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -1,13 +1,12 @@ -import Image from './Image' -import Link from './Link' +import Image from './Image'; +import Link from './Link'; const Card = ({ title, description, imgSrc, href }) => (
+ } overflow-hidden rounded-md border-2 border-gray-200 border-opacity-60 dark:border-gray-700`}> {imgSrc && (href ? ( @@ -38,19 +37,20 @@ const Card = ({ title, description, imgSrc, href }) => ( title )} -

{description}

+

+ {description} +

{href && ( + aria-label={`Link to ${title}`}> Learn more → )}
-) +); -export default Card +export default Card; diff --git a/components/ClientReload.tsx b/components/ClientReload.tsx index e8713e9..b575934 100644 --- a/components/ClientReload.tsx +++ b/components/ClientReload.tsx @@ -1,5 +1,5 @@ -import { useEffect } from 'react' -import Router from 'next/router' +import { useEffect } from 'react'; +import Router from 'next/router'; /** * Client-side complement to next-remote-watch @@ -10,14 +10,14 @@ export const ClientReload = () => { // Exclude socket.io from prod bundle useEffect(() => { import('socket.io-client').then((module) => { - const socket = module.io() + const socket = module.io(); socket.on('reload', () => { Router.replace(Router.asPath, undefined, { scroll: false, - }) - }) - }) - }, []) + }); + }); + }); + }, []); - return null -} + return null; +}; diff --git a/components/Footer.tsx b/components/Footer.tsx index 7b034be..02eb537 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,13 +1,17 @@ -import Link from './Link' -import siteMetadata from '@/data/siteMetadata' -import SocialIcon from '@/components/social-icons' +import Link from './Link'; +import siteMetadata from '@/data/siteMetadata'; +import SocialIcon from '@/components/social-icons'; export default function Footer() { return ( - ) + ); } diff --git a/components/Image.tsx b/components/Image.tsx index fde277a..d5022ca 100644 --- a/components/Image.tsx +++ b/components/Image.tsx @@ -1,5 +1,5 @@ -import NextImage, { ImageProps } from 'next/image' +import NextImage, { ImageProps } from 'next/image'; -const Image = ({ ...rest }: ImageProps) => +const Image = ({ ...rest }: ImageProps) => ; -export default Image +export default Image; diff --git a/components/LayoutWrapper.tsx b/components/LayoutWrapper.tsx index 08ef946..e6feb0e 100644 --- a/components/LayoutWrapper.tsx +++ b/components/LayoutWrapper.tsx @@ -1,15 +1,15 @@ -import siteMetadata from '@/data/siteMetadata' -import headerNavLinks from '@/data/headerNavLinks' -import Logo from '@/data/logo.svg' -import Link from './Link' -import SectionContainer from './SectionContainer' -import Footer from './Footer' -import MobileNav from './MobileNav' -import ThemeSwitch from './ThemeSwitch' -import { ReactNode } from 'react' +import siteMetadata from '@/data/siteMetadata'; +import headerNavLinks from '@/data/headerNavLinks'; +import Logo from '@/data/logo.svg'; +import Link from './Link'; +import SectionContainer from './SectionContainer'; +import Footer from './Footer'; +import MobileNav from './MobileNav'; +import ThemeSwitch from './ThemeSwitch'; +import { ReactNode } from 'react'; interface Props { - children: ReactNode + children: ReactNode; } const LayoutWrapper = ({ children }: Props) => { @@ -39,8 +39,7 @@ const LayoutWrapper = ({ children }: Props) => { + className="p-1 font-medium text-gray-900 dark:text-gray-100 sm:p-4"> {link.title} ))} @@ -53,7 +52,7 @@ const LayoutWrapper = ({ children }: Props) => {