mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
29 lines
845 B
TypeScript
29 lines
845 B
TypeScript
|
import { signIn } from "@/lib/auth";
|
||
|
import { Input } from "@/components/ui/input";
|
||
|
import { Label } from "@/components/ui/label";
|
||
|
import { Button } from "@/components/ui/button";
|
||
|
|
||
|
export function CredentialsSignIn() {
|
||
|
return (
|
||
|
<form
|
||
|
className="grid gap-6"
|
||
|
action={async (formData) => {
|
||
|
"use server";
|
||
|
await signIn("credentials", formData);
|
||
|
}}
|
||
|
>
|
||
|
<div className="grid gap-2">
|
||
|
<Label htmlFor="email">Email</Label>
|
||
|
<Input id="email" name="email" type="email" placeholder="m@example.com" required />
|
||
|
</div>
|
||
|
<div className="grid gap-2">
|
||
|
<Label htmlFor="password">Password</Label>
|
||
|
<Input id="password" name="password" type="password" required />
|
||
|
</div>
|
||
|
<Button type="submit" className="w-full">
|
||
|
Sign In
|
||
|
</Button>
|
||
|
</form>
|
||
|
);
|
||
|
}
|