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