Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

371 B
Raw Blame
import { redirect } from "next/navigation";
import { auth } from "@/auth";
import db from "@/lib/db";

export default async function RootPage() {
  const session = await auth();

  if (session?.user) {
    redirect("/dashboard");
  }

  const userCount = await db.user.count();

  if (userCount === 0) {
    redirect("/signup");
  } else {
    redirect("/signin");
  }
}