13 lines
275 B
TypeScript
13 lines
275 B
TypeScript
"use server";
|
|
|
|
import { redirect } from "next/navigation";
|
|
import { isLoggedIn } from "@/components/auth";
|
|
import FormComponent from "./Form";
|
|
|
|
export default async function Login() {
|
|
if (await isLoggedIn()) {
|
|
redirect("/blog/write");
|
|
}
|
|
return <FormComponent />;
|
|
}
|