"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 />;
}
