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.

Fix redirect issue

Khuram Niaz428068346a40
diff --git a/next.config.mjs b/next.config.mjs
index 4d3864f..f839c0f 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -1,14 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
- async redirects() {
- return [
- {
- source: "/",
- destination: "/dashboard",
- permanent: true,
- },
- ];
- },
output: "standalone",
devIndicators: false,
};
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 11e6a47..5be0adb 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,7 +1,14 @@
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) {