"use client" import { useState } from "react" import styles from "./auth.module.css" import Link from "../../components/link" import { signIn } from "next-auth/react" import { Github as GithubIcon } from "@geist-ui/icons" import Input from "@components/input" import Button from "@components/button" import Note from "@components/note" const Auth = ({ page, requiresServerPassword }: { page: "signup" | "signin" requiresServerPassword?: boolean }) => { const [serverPassword, setServerPassword] = useState("") const [errorMsg, setErrorMsg] = useState("") const signingIn = page === "signin" return (

{signingIn ? "Sign In" : "Sign Up"}

{/*
*/}
{/* setUsername(event.currentTarget.value)} placeholder="Username" required minLength={3} width="100%" /> setPassword(event.currentTarget.value)} placeholder="Password" required minLength={6} width="100%" /> */} {/* sign in with github */} {requiresServerPassword && ( setServerPassword(event.currentTarget.value) } placeholder="Server Password" required width="100%" /> )} {/* */}
{signingIn ? (

Don't have an account?{" "} Sign up

) : (

Have an account?{" "} Sign in

)}
{errorMsg && {errorMsg}}
) } export default Auth