Files
sign/apps/web/components/login.tsx

87 lines
3.5 KiB
TypeScript
Raw Normal View History

2022-12-06 19:16:34 +01:00
import { LockClosedIcon } from "@heroicons/react/20/solid";
2022-12-08 16:04:22 +01:00
import Link from "next/link";
2022-12-06 19:16:34 +01:00
import Logo from "./logo";
2022-12-08 22:42:19 +01:00
import { signIn } from "next-auth/react";
2022-12-06 19:16:34 +01:00
export default function Example() {
return (
<>
<div className="flex min-h-full items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
<div className="w-full max-w-md space-y-8">
<div>
<Logo className="mx-auto h-12 w-auto"></Logo>
<h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-gray-900">
Sign in to your account
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
Or{" "}
<a href="#" className="font-medium text-neon hover:text-neon">
2022-12-06 21:35:54 +01:00
create a new Account
2022-12-06 19:16:34 +01:00
</a>
</p>
</div>
<form className="mt-8 space-y-6" action="#" method="POST">
<input type="hidden" name="remember" defaultValue="true" />
<div className="-space-y-px rounded-md shadow-sm">
<div>
<label htmlFor="email-address" className="sr-only">
Email
</label>
<input
id="email-address"
name="email"
type="email"
autoComplete="email"
required
className="relative block w-full appearance-none rounded-none rounded-t-md border border-gray-300 px-3 py-2 text-gray-900 placeholder-gray-500 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
placeholder="Email address"
/>
</div>
<div>
<label htmlFor="password" className="sr-only">
Password
</label>
<input
id="password"
name="password"
type="password"
autoComplete="current-password"
required
className="relative block w-full appearance-none rounded-none rounded-b-md border border-gray-300 px-3 py-2 text-gray-900 placeholder-gray-500 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
placeholder="Password"
/>
</div>
</div>
<div className="flex items-center justify-between">
<div className="text-sm">
<a href="#" className="font-medium text-neon hover:text-neon">
Forgot your password?
</a>
</div>
</div>
<div>
2022-12-08 22:42:19 +01:00
<button
onClick={(e) => {
e.preventDefault();
signIn(undefined, { callbackUrl: "/dashboard" });
2022-12-08 22:42:19 +01:00
}}
className="group relative flex w-full justify-center rounded-md border border-transparent bg-neon py-2 px-4 text-sm font-medium text-white hover:bg-neon-dark focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
>
<span className="absolute inset-y-0 left-0 flex items-center pl-3">
<LockClosedIcon
className="h-5 w-5 text-neon-dark group-hover:text-neon"
aria-hidden="true"
/>
</span>
Sign in
</button>
2022-12-06 19:16:34 +01:00
</div>
</form>
</div>
</div>
</>
);
}