From 0ae9d6efd84762443ace3869fa352debc3017e76 Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Mon, 25 Jul 2022 18:31:20 +0100 Subject: [PATCH] chore: run prettier --- components/Button.tsx | 45 +- components/NavBar.tsx | 18 +- components/TextInput.tsx | 35 +- next.config.js | 4 +- pages/_app.tsx | 14 +- pages/api/auth/[...nextauth].ts | 6 +- pages/api/submit-page-bubbles.ts | 53 ++- pages/comic/[comic]/index.tsx | 100 +++-- pages/comic/[comic]/transcribe/[page].tsx | 495 +++++++++++++--------- pages/comic/[comic]/transcribe/random.tsx | 65 +-- postcss.config.js | 10 +- prisma/seed-data/comics/rain.json | 4 +- prisma/seed.ts | 22 +- src/ocr.ts | 36 +- src/utils.ts | 21 +- tailwind.config.js | 24 +- 16 files changed, 577 insertions(+), 375 deletions(-) diff --git a/components/Button.tsx b/components/Button.tsx index 82d0618..62a4b49 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -1,16 +1,43 @@ -import { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, RefAttributes } from "react"; +import { + AnchorHTMLAttributes, + ButtonHTMLAttributes, + DetailedHTMLProps, + RefAttributes, +} from 'react'; import Link, { LinkProps } from 'next/link'; -export default function Button({ className, ...props }: DetailedHTMLProps, HTMLButtonElement>) { - return } - {status === 'authenticated' && <> - {data?.user?.name} - - } + {status === 'unauthenticated' && ( + + )} + {status === 'authenticated' && ( + <> + {data?.user?.name} + + + )} - ) + ); } diff --git a/components/TextInput.tsx b/components/TextInput.tsx index eeff077..273d919 100644 --- a/components/TextInput.tsx +++ b/components/TextInput.tsx @@ -1,12 +1,37 @@ -import { DetailedHTMLProps, InputHTMLAttributes, TextareaHTMLAttributes } from "react"; +import { + DetailedHTMLProps, + InputHTMLAttributes, + TextareaHTMLAttributes, +} from 'react'; -type Props = ({ multiline: true } & DetailedHTMLProps, HTMLTextAreaElement>) - | ({ multiline: false | undefined } & DetailedHTMLProps, HTMLInputElement>); +type Props = + | ({ multiline: true } & DetailedHTMLProps< + TextareaHTMLAttributes, + HTMLTextAreaElement + >) + | ({ multiline: false | undefined } & DetailedHTMLProps< + InputHTMLAttributes, + HTMLInputElement + >); export default function TextInput({ multiline, className, ...props }: Props) { if (multiline) { - return