pre-bemis

This commit is contained in:
Marcelo
2026-04-22 05:04:19 +00:00
parent ac1a7900c8
commit 80d27f83b6
91 changed files with 11769 additions and 820 deletions

View File

@@ -6,13 +6,14 @@ import LoginForm from "./LoginForm"; // adjust path if needed
export default async function LoginPage({
searchParams,
}: {
searchParams?: { next?: string };
searchParams?: Promise<{ next?: string }>;
}) {
const session = (await cookies()).get("mis_session")?.value;
// If already logged in, send to next or machines
if (session) {
const next = searchParams?.next || "/machines";
const params = searchParams ? await searchParams : {};
const next = params?.next || "/machines";
redirect(next);
}