forked from fahrPool/fahrPool
28 lines
690 B
TypeScript
28 lines
690 B
TypeScript
import { login } from "./actions";
|
|
|
|
export default async function LoginPage({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{ error?: string }>;
|
|
}) {
|
|
const { error } = await searchParams;
|
|
|
|
return (
|
|
<main>
|
|
<h1>Anmelden</h1>
|
|
{error && <p role="alert">{error}</p>}
|
|
<form action={login}>
|
|
<div>
|
|
<label htmlFor="email">E-Mail</label>
|
|
<input id="email" name="email" type="email" required />
|
|
</div>
|
|
<div>
|
|
<label htmlFor="password">Passwort</label>
|
|
<input id="password" name="password" type="password" required />
|
|
</div>
|
|
<button type="submit">Anmelden</button>
|
|
</form>
|
|
</main>
|
|
);
|
|
}
|