From 867fb0693b8e30d61e550f42e81bd62558ee2f73 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sun, 18 Jan 2026 19:39:46 +0530 Subject: [PATCH] feat: Add ProfileCard, SpecializationSection, and TestimonialsSection components to the agent dashboard, and update styling for ExperienceSection. --- .../dashboard/component/ExperienceSection.tsx | 4 +- .../agent/dashboard/component/ProfileCard.tsx | 127 +++++++++++ .../component/SpecializationSection.tsx | 91 ++++++++ .../component/TestimonialsSection.tsx | 37 ++++ .../agent/dashboard/component/index.ts | 3 + src/app/(agent)/agent/dashboard/page.tsx | 199 ++---------------- 6 files changed, 275 insertions(+), 186 deletions(-) create mode 100644 src/app/(agent)/agent/dashboard/component/ProfileCard.tsx create mode 100644 src/app/(agent)/agent/dashboard/component/SpecializationSection.tsx create mode 100644 src/app/(agent)/agent/dashboard/component/TestimonialsSection.tsx diff --git a/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx b/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx index f8b8f57..c3f6ae3 100644 --- a/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx +++ b/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx @@ -16,8 +16,8 @@ interface ExperienceSectionProps { export function ExperienceSection({ experience }: ExperienceSectionProps) { return ( -
-

Experience

+
+

Experience

{/* Left Column */}
diff --git a/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx b/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx new file mode 100644 index 0000000..9d01505 --- /dev/null +++ b/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx @@ -0,0 +1,127 @@ +'use client'; + +import Image from 'next/image'; +import { Tag } from './Tag'; + +interface ProfileCardProps { + firstName: string; + lastName: string; + isVerified: boolean; + title: string; + location: string; + memberSince: string; + bio: string; + expertise: string[]; +} + +export function ProfileCard({ + firstName, + lastName, + isVerified, + title, + location, + memberSince, + bio, + expertise, +}: ProfileCardProps) { + return ( +
+ {/* Name and Actions Row */} +
+
+
+

+ {firstName}{' '} + {lastName} +

+ {isVerified && ( + <> + Verified + + (Verified Expert) + + + )} + +
+

{title}

+
+ + Location + + {location} + + + + Calendar + + Member Since {memberSince} + + +
+
+ + {/* Action Buttons */} +
+ + +
+
+ + {/* Bio */} +

+ {bio} +

+ + {/* Expertise Tags */} +
+

+ Expertise: +

+
+ {expertise.map((tag, idx) => ( + {tag} + ))} +
+
+
+ ); +} diff --git a/src/app/(agent)/agent/dashboard/component/SpecializationSection.tsx b/src/app/(agent)/agent/dashboard/component/SpecializationSection.tsx new file mode 100644 index 0000000..73253a3 --- /dev/null +++ b/src/app/(agent)/agent/dashboard/component/SpecializationSection.tsx @@ -0,0 +1,91 @@ +'use client'; + +import Image from 'next/image'; +import { SpecializationCard } from './SpecializationCard'; + +interface SpecializationData { + types: string[]; + loanTypes: string[]; + propertyTypes: string[]; + hobbies: string[]; + pricePoints: string[]; +} + +interface SpecializationSectionProps { + specialization: SpecializationData; +} + +export function SpecializationSection({ specialization }: SpecializationSectionProps) { + return ( +
+
+

Specialization

+

Area Of Expertise and Focus

+
+
+ + } + /> + + } + /> + + } + /> +
+
+ + } + /> + + } + /> +
+
+ ); +} diff --git a/src/app/(agent)/agent/dashboard/component/TestimonialsSection.tsx b/src/app/(agent)/agent/dashboard/component/TestimonialsSection.tsx new file mode 100644 index 0000000..15d69c5 --- /dev/null +++ b/src/app/(agent)/agent/dashboard/component/TestimonialsSection.tsx @@ -0,0 +1,37 @@ +'use client'; + +import { TestimonialCard } from './TestimonialCard'; + +interface Testimonial { + id: number; + text: string; + author: string; + role: string; + rating: number; +} + +interface TestimonialsSectionProps { + testimonials: Testimonial[]; +} + +export function TestimonialsSection({ testimonials }: TestimonialsSectionProps) { + return ( +
+

Testimonials

+

+ Clients rate our real estate services 4.9 out of 5 on average, based on recent client reviews. +

+
+ {testimonials.map((testimonial) => ( + + ))} +
+
+ ); +} diff --git a/src/app/(agent)/agent/dashboard/component/index.ts b/src/app/(agent)/agent/dashboard/component/index.ts index 94c0076..7336ff9 100644 --- a/src/app/(agent)/agent/dashboard/component/index.ts +++ b/src/app/(agent)/agent/dashboard/component/index.ts @@ -5,5 +5,8 @@ export { InfoCard } from './InfoCard'; export { SpecializationCard } from './SpecializationCard'; export { ProfileSidebar } from './ProfileSidebar'; export { ProfileHeader } from './ProfileHeader'; +export { ProfileCard } from './ProfileCard'; export { ExperienceSection } from './ExperienceSection'; +export { SpecializationSection } from './SpecializationSection'; export { TestimonialCard } from './TestimonialCard'; +export { TestimonialsSection } from './TestimonialsSection'; diff --git a/src/app/(agent)/agent/dashboard/page.tsx b/src/app/(agent)/agent/dashboard/page.tsx index 1d6838b..2ab6093 100644 --- a/src/app/(agent)/agent/dashboard/page.tsx +++ b/src/app/(agent)/agent/dashboard/page.tsx @@ -5,11 +5,11 @@ import Image from 'next/image'; // Import components from component folder import { - Tag, InfoCard, - SpecializationCard, - TestimonialCard, ExperienceSection, + ProfileCard, + SpecializationSection, + TestimonialsSection, } from './component'; // Mock agent data - in production, this would come from API @@ -158,100 +158,16 @@ export default function AgentDashboard() { {/* Right Content - Profile Info + Experience + All Sections */}
{/* Profile Card */} -
- {/* Name and Actions Row */} -
-
-
-

- {firstName}{' '} - {lastName} -

- {agentData.isVerified && ( - <> - Verified - - (Verified Expert) - - - )} - -
-

{agentData.title}

-
- - Location - - {agentData.location} - - - - Calendar - - Member Since {agentData.memberSince} - - -
-
- - {/* Action Buttons */} -
- - -
-
- - {/* Bio */} -

{agentData.bio}

- - {/* Expertise Tags */} -
-

Expertise:

-
- {agentData.expertise.map((tag, idx) => ( - {tag} - ))} -
-
-
+ {/* Experience Section */} @@ -306,95 +222,10 @@ export default function AgentDashboard() {
{/* Specialization Section */} -
-
-

Specialization

-

Area Of Expertise and Focus

-
-
- - } - /> - - } - /> - - } - /> -
-
- - } - /> - - } - /> -
-
+ {/* Testimonials Section */} -
-

Testimonials

-

- Clients rate our real estate services 4.9 out of 5 on average, based on recent client reviews. -

-
- {agentData.testimonials.map((testimonial) => ( - - ))} -
-
+