From 8df27a285b91445c317304ae09625dc900d780c2 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sun, 18 Jan 2026 18:16:55 +0530 Subject: [PATCH] feat: Implement responsive ExperienceSection and add eye icons to reveal masked contact details on the agent dashboard. --- public/assets/icons/eye-icon.svg | 3 + .../dashboard/component/ExperienceSection.tsx | 121 ++++--- src/app/(agent)/agent/dashboard/page.tsx | 297 ++++++++++-------- 3 files changed, 260 insertions(+), 161 deletions(-) create mode 100644 public/assets/icons/eye-icon.svg diff --git a/public/assets/icons/eye-icon.svg b/public/assets/icons/eye-icon.svg new file mode 100644 index 0000000..d4db9d2 --- /dev/null +++ b/public/assets/icons/eye-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx b/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx index e66c653..0c2868d 100644 --- a/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx +++ b/src/app/(agent)/agent/dashboard/component/ExperienceSection.tsx @@ -16,58 +16,109 @@ interface ExperienceSectionProps { export function ExperienceSection({ experience }: ExperienceSectionProps) { return ( -
-

Experience

-
- {/* Left Column */} -
-
+ <> + {/* Desktop Layout */} +
+

Experience

+
+ {/* Left Column */} +
+
+

Years in Experience

+
    +
  • {experience.years}
  • +
+
+
+

Number of contract closed

+
    +
  • {experience.contracts}
  • +
+
+
+

Licensing & Areas

+
+ {experience.licensingAreas.map((area, idx) => ( + + {area} + + ))} + +3 More +
+
+
+ + {/* Divider */} +
+ + {/* Right Column */} +
+
+

Areas in expertise & Years

+
+ {experience.expertiseYears.slice(0, 4).map((item, idx) => ( + + {item.area} – {item.years} + + ))} + +3More +
+
+
+

Certifications

+
    + {experience.certifications.map((cert, idx) => ( +
  • + • {cert.name} +

    {cert.org}

    +
  • + ))} +
+
+
+
+
+ + {/* Mobile Layout */} +
+

Experience

+
+

Years in Experience

-
    +
    • {experience.years}
-
-

Number of contract coised

-
    +
    +

    Number of contract closed

    +
    • {experience.contracts}
    -
    +

    Licensing & Areas

    - {experience.licensingAreas.slice(0, 5).map((area, idx) => ( + {experience.licensingAreas.map((area, idx) => ( {area} ))} - {experience.licensingAreas.length > 5 && ( - - +{experience.licensingAreas.length - 5} More - - )} + + +3 More +
    -
    - - {/* Divider */} -
    - - {/* Right Column */} -
    -
    +

    Areas in expertise & Years

    - {experience.expertiseYears.slice(0, 3).map((item, idx) => ( - + {experience.expertiseYears.map((item, idx) => ( + {item.area} – {item.years} ))} - {experience.expertiseYears.length > 3 && ( - - +{experience.expertiseYears.length - 3}More - - )} + + +3More +
    @@ -75,14 +126,14 @@ export function ExperienceSection({ experience }: ExperienceSectionProps) {
      {experience.certifications.map((cert, idx) => (
    • - • {cert.name} -

      {cert.org}

      + • {cert.name} +

      {cert.org}

    • ))}
    -
    + ); } diff --git a/src/app/(agent)/agent/dashboard/page.tsx b/src/app/(agent)/agent/dashboard/page.tsx index a06d49a..3830cca 100644 --- a/src/app/(agent)/agent/dashboard/page.tsx +++ b/src/app/(agent)/agent/dashboard/page.tsx @@ -9,6 +9,7 @@ import { InfoCard, SpecializationCard, TestimonialCard, + ExperienceSection, } from './component'; // Mock agent data - in production, this would come from API @@ -201,8 +202,8 @@ export default function AgentDashboard() {

- {/* Desktop: Original Layout */} -
+ {/* Desktop: Original Layout - Sidebar + Right Content (Profile + Experience) */} +
{/* Left Sidebar - Status & Contact */}
{/* Profile Image */} @@ -255,15 +256,23 @@ export default function AgentDashboard() {
Email: - *****brian@gmail.com + ********brain@gmail.com +
Ph.No: {agentData.phone}
- {/* Right Content - Profile Info */} -
+ {/* Right Content - Profile Info + Experience */} +
+ {/* Profile Card */}
{/* Name and Actions Row */}
@@ -364,124 +374,159 @@ export default function AgentDashboard() {
+ + {/* Experience Section - Inside the same row */} + + + {/* Info Cards Section - Desktop */} +
+ + } + content={ +
+

{agentData.availability.type}

+
+ {agentData.availability.days.map((day) => ( +

{day}

+ ))} +
+
+ } + /> + + } + content={

{agentData.preferredWorkEnvironment}

} + /> + + } + content={

“{agentData.testimonialHighlight}”

} + /> +
+ + {/* Specialization Section - Desktop */} +
+
+

Specialization

+

Area Of Expertise and Focus

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

Testimonials

+

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

+
+ {agentData.testimonials.map((testimonial) => ( + + ))} +
+
- {/* Experience Section */} + {/* Mobile Experience Section */}
-

Experience

-
-
-

Years in Experience

-
    -
  • {agentData.experience.years}
  • -
-
-
-

Number of contract closed

-
    -
  • {agentData.experience.contracts}
  • -
-
-
-

Licensing & Areas

-
- {agentData.experience.licensingAreas.map((area, idx) => ( - {area} - ))} - - +3 More - -
-
-
-

Areas in expertise & Years

-
- {agentData.experience.expertiseYears.map((item, idx) => ( - - {item.area} – {item.years} - - ))} - - +3More - -
-
-
-

Certifications

-
    - {agentData.experience.certifications.map((cert, idx) => ( -
  • - • {cert.name} -

    {cert.org}

    -
  • - ))} -
-
-
+
- {/* Desktop Experience Section */} -
-

Experience

-
-
-
-

Years in Experience

-
    -
  • {agentData.experience.years}
  • -
-
-
-

Number of contract closed

-
    -
  • {agentData.experience.contracts}
  • -
-
-
-

Licensing & Areas

-
- {agentData.experience.licensingAreas.slice(0, 5).map((area, idx) => ( - {area} - ))} - {agentData.experience.licensingAreas.length > 5 && ( - +{agentData.experience.licensingAreas.length - 5} More - )} -
-
-
-
-
-
-

Areas in expertise & Years

-
- {agentData.experience.expertiseYears.slice(0, 3).map((item, idx) => ( - - {item.area} – {item.years} - - ))} - {agentData.experience.expertiseYears.length > 3 && ( - +{agentData.experience.expertiseYears.length - 3}More - )} -
-
-
-

Certifications

-
    - {agentData.experience.certifications.map((cert, idx) => ( -
  • - • {cert.name} -

    {cert.org}

    -
  • - ))} -
-
-
-
-
- - {/* Info Cards Section - Stack on Mobile */} -
+ {/* Info Cards Section - Mobile */} +
- {/* Specialization Section - Single Column on Mobile */} -
+ {/* Specialization Section - Mobile */} +

Specialization

Area Of Expertise and Focus

-
+
-
+
- {/* Testimonials Section - Single Column on Mobile */} -
+ {/* Testimonials Section - Mobile */} +

Testimonials

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

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