Full project added

This commit is contained in:
Marcelo Dares
2025-12-17 20:24:06 +00:00
parent fc2e4fd15a
commit 0e9b2dd72d
36 changed files with 2050 additions and 84 deletions

22
app/login/page.tsx Normal file
View File

@@ -0,0 +1,22 @@
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import LoginForm from "./LoginForm"; // adjust path if needed
export default async function LoginPage({
searchParams,
}: {
searchParams?: { 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";
redirect(next);
}
// ...your existing login UI below
return <LoginForm />; // ✅ actually render it
}