2025-04-02 00:17:25 +02:00
|
|
|
"use server";
|
|
|
|
|
|
|
|
import { redirect } from "next/navigation";
|
2025-04-02 01:30:34 +02:00
|
|
|
import { isLoggedIn } from "@/components/auth";
|
2025-04-02 00:17:25 +02:00
|
|
|
import FormComponent from "./Form";
|
|
|
|
|
|
|
|
export default async function Login() {
|
|
|
|
if (await isLoggedIn()) {
|
|
|
|
redirect("/blog/write");
|
|
|
|
}
|
|
|
|
return <FormComponent />;
|
|
|
|
}
|