feat: Redesign the home page hero section with a new background image and enhanced search UI, and standardize user dashboard routing across the application.

This commit is contained in:
pradeepkumar
2026-01-19 09:46:32 +05:30
parent db3b12507e
commit 5a845e4b5d
9 changed files with 174 additions and 99 deletions

View File

@@ -2,7 +2,7 @@ import { auth } from "@/auth";
import { NextResponse } from "next/server";
// Public routes that don't require authentication
const publicRoutes = ["/login", "/signup", "/forgot-password", "/reset-password", "/verify-email"];
const publicRoutes = ["/login", "/signup", "/forgot-password", "/reset-password", "/verify-email", "/contact"];
export default auth((req) => {
const { nextUrl } = req;
@@ -43,7 +43,7 @@ export default auth((req) => {
if (isLoggedIn) {
// Prevent regular users from accessing agent routes
if (isAgentRoute && userRole !== "AGENT") {
return NextResponse.redirect(new URL("/user/userprofile", nextUrl.origin));
return NextResponse.redirect(new URL("/user/userdashboard", nextUrl.origin));
}
// Prevent agents from accessing user routes