-
+
{/* Main Content */}
diff --git a/src/app/(user)/user/userprofile/page.tsx b/src/app/(user)/user/dashboard/page.tsx
similarity index 100%
rename from src/app/(user)/user/userprofile/page.tsx
rename to src/app/(user)/user/dashboard/page.tsx
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 8ad8a5e..2329846 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -22,7 +22,7 @@ export default function Home() {
if (userRole === 'AGENT') {
router.replace('/agent/dashboard');
} else {
- router.replace('/user/userprofile');
+ router.replace('/user/userdashboard');
}
}, [session, status, router]);
diff --git a/src/components/home/HeroSection.tsx b/src/components/home/HeroSection.tsx
index 6d7ad1f..e9a1b64 100644
--- a/src/components/home/HeroSection.tsx
+++ b/src/components/home/HeroSection.tsx
@@ -2,9 +2,10 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
-import { Button } from '../ui/Button';
+import Image from 'next/image';
const propertyTypes = [
+ { value: '', label: 'Types' },
{ value: 'residential', label: 'Residential' },
{ value: 'commercial', label: 'Commercial' },
{ value: 'luxury', label: 'Luxury Homes' },
@@ -12,12 +13,20 @@ const propertyTypes = [
];
const categories = [
+ { value: '', label: 'Categories' },
+ { value: 'luxury-broker', label: 'Luxury Broker' },
{ value: 'buying', label: 'Buying Agent' },
{ value: 'selling', label: 'Selling Agent' },
{ value: 'investment', label: 'Investment' },
{ value: 'property-management', label: 'Property Management' },
];
+const quickFilters = [
+ { label: 'Professionals', value: 'professionals' },
+ { label: 'Lenders', value: 'lenders' },
+ { label: 'Agent', value: 'agent' },
+];
+
export function HeroSection() {
const router = useRouter();
const [searchParams, setSearchParams] = useState({
@@ -26,6 +35,7 @@ export function HeroSection() {
location: '',
category: '',
});
+ const [openDropdown, setOpenDropdown] = useState
(null);
const handleSearch = () => {
const params = new URLSearchParams();
@@ -36,114 +46,177 @@ export function HeroSection() {
router.push(`/agents?${params.toString()}`);
};
+ const handleSeeAllAgents = () => {
+ router.push('/agents');
+ };
+
+ const toggleDropdown = (dropdown: string) => {
+ setOpenDropdown(openDropdown === dropdown ? null : dropdown);
+ };
+
+ const selectOption = (field: 'type' | 'category', value: string, label: string) => {
+ setSearchParams({ ...searchParams, [field]: value });
+ setOpenDropdown(null);
+ };
+
return (
-
- {/* Background Pattern */}
-
-
+
+ {/* Background Image */}
+
+
-
+
{/* Headline */}
-
-
+
+
“Discover verified, top-rated real estate professionals to guide your buying, selling, or investing journey.”
-
- Discover verified, top-rated real estate professionals
+
+ “Discover verified, top-rated real estate professionals.”
{/* Search Form */}
-
-
- {/* Type Select */}
-
-
-
+
+
+
+ {/* Type Select */}
+
+
+ {openDropdown === 'type' && (
+
+ {propertyTypes.map((type) => (
+
+ ))}
+
+ )}
+
+
+ {/* Name Input */}
+
+ setSearchParams({ ...searchParams, name: e.target.value })}
+ className="w-full px-4 py-3 rounded-[10px] border-2 border-[#e58625] bg-white font-serif text-sm text-[#00293d] placeholder:text-[#00293d]/50 focus:outline-none focus:ring-2 focus:ring-[#e58625]/30"
+ />
+
+
+ {/* Location Input */}
+
+ setSearchParams({ ...searchParams, location: e.target.value })}
+ className="w-full px-4 py-3 rounded-[10px] border-2 border-[#e58625] bg-white font-serif text-sm text-[#00293d] placeholder:text-[#00293d]/50 focus:outline-none focus:ring-2 focus:ring-[#e58625]/30"
+ />
+
+
+ {/* Category Select */}
+
+
+ {openDropdown === 'category' && (
+
+ {categories.map((cat) => (
+
+ ))}
+
+ )}
+
+
+ {/* Search Button */}
+
- {/* Name Input */}
-
-
- setSearchParams({ ...searchParams, name: e.target.value })}
- className="w-full px-4 py-3 rounded-lg border border-gray-200 focus:border-[#00293d] focus:ring-2 focus:ring-[#00293d]/20 outline-none transition-all"
- />
-
-
- {/* Location Input */}
-
-
- setSearchParams({ ...searchParams, location: e.target.value })}
- className="w-full px-4 py-3 rounded-lg border border-gray-200 focus:border-[#00293d] focus:ring-2 focus:ring-[#00293d]/20 outline-none transition-all"
- />
-
-
- {/* Category Select */}
-
-
-
+ {/* Quick Filter Links */}
+
+ {quickFilters.map((filter, index) => (
+
+
+ {index < quickFilters.length - 1 && (
+ |
+ )}
+
+ ))}
- {/* Quick Links */}
-
-
- |
-
-
-
- {/* Search Button */}
-
-
diff --git a/src/components/layout/CommonHeader.tsx b/src/components/layout/CommonHeader.tsx
index 473c115..aff5fee 100644
--- a/src/components/layout/CommonHeader.tsx
+++ b/src/components/layout/CommonHeader.tsx
@@ -20,7 +20,7 @@ export function CommonHeader() {
const userRole = (session?.user as any)?.role;
// Determine dashboard link based on user role
- const dashboardLink = userRole === 'AGENT' ? '/agent/dashboard' : '/user/userprofile';
+ const dashboardLink = userRole === 'AGENT' ? '/agent/dashboard' : '/user/userdashboard';
return (
diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx
index a27ff11..73baacc 100644
--- a/src/components/layout/Header.tsx
+++ b/src/components/layout/Header.tsx
@@ -47,7 +47,7 @@ export function Header() {
{/* Profile */}
-
+
diff --git a/src/middleware.ts b/src/middleware.ts
index a5ebad8..34e65f3 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -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