This commit is contained in:
Marcelo
2026-02-17 00:07:00 +00:00
parent b7a86a2d1c
commit be4ca2ed78
92 changed files with 6850 additions and 1188 deletions

8
app/(auth)/auth/login/page.tsx Normal file → Executable file
View File

@@ -3,6 +3,8 @@ import LoginForm from "@/components/auth/LoginForm";
type LoginPageProps = {
searchParams: Promise<{
redirectTo?: string | string[];
role?: string | string[];
forgot?: string | string[];
}>;
};
@@ -10,6 +12,10 @@ export default async function LoginPage({ searchParams }: LoginPageProps) {
const params = await searchParams;
const redirectValue = params.redirectTo;
const redirectTo = Array.isArray(redirectValue) ? redirectValue[0] : redirectValue;
const roleValue = params.role;
const role = Array.isArray(roleValue) ? roleValue[0] : roleValue;
const forgotValue = params.forgot;
const forgot = Array.isArray(forgotValue) ? forgotValue[0] : forgotValue;
return <LoginForm redirectTo={redirectTo ?? "/courses"} />;
return <LoginForm redirectTo={redirectTo ?? "/courses"} role={role} showForgot={forgot === "1"} />;
}