import { cookies } from "next/dist/client/components/headers";
import styles from "@/app/page.module.css";
import RegisterForm from "./RegisterForm";

export default function Page() {
  const cookieStore = cookies();
  const ticket = cookieStore.get("ticket");
  if (ticket === null) {
    window.location.href = "/";
    return;
  }

  return (
    <main className={styles.main}>
      <RegisterForm />
    </main>
  );
}
