First commit
This commit is contained in:
15
app/(auth)/auth/login/page.tsx
Normal file
15
app/(auth)/auth/login/page.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import LoginForm from "@/components/auth/LoginForm";
|
||||
|
||||
type LoginPageProps = {
|
||||
searchParams: Promise<{
|
||||
redirectTo?: string | string[];
|
||||
}>;
|
||||
};
|
||||
|
||||
export default async function LoginPage({ searchParams }: LoginPageProps) {
|
||||
const params = await searchParams;
|
||||
const redirectValue = params.redirectTo;
|
||||
const redirectTo = Array.isArray(redirectValue) ? redirectValue[0] : redirectValue;
|
||||
|
||||
return <LoginForm redirectTo={redirectTo ?? "/courses"} />;
|
||||
}
|
||||
Reference in New Issue
Block a user