import { redirect } from "next/navigation"; import { getCurrentUser, homeForRole } from "../../lib/auth"; import { login } from "./actions"; export default async function LoginPage({ searchParams, }: { searchParams: Promise<{ error?: string }>; }) { const user = await getCurrentUser(); if (user) redirect(homeForRole(user.role)); const { error } = await searchParams; return (

Rikx Beheer

{error && (

Ongeldig e-mailadres of wachtwoord.

)}
); }