Fix server action structuur in login en tenants pagina's
Inline server actions in page components veroorzaken runtime errors. Verplaatst naar aparte actions.ts / logout.ts bestanden. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
"use server";
|
||||
|
||||
import { redirect } from "next/navigation";
|
||||
import { destroySession } from "../../lib/auth";
|
||||
|
||||
export async function logout() {
|
||||
await destroySession();
|
||||
redirect("/login");
|
||||
}
|
||||
Reference in New Issue
Block a user