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