From be863d4ec24d06e733900247f99769ec02f7d3ab Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Wed, 4 Mar 2026 21:22:36 +0530 Subject: [PATCH] feat: dynamically adjust About page content and calls-to-action based on the user's agent status. --- src/app/about/page.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index c609398..7ff68c0 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -3,6 +3,7 @@ import { useState, useEffect } from 'react'; import Image from 'next/image'; import Link from 'next/link'; +import { useSession } from 'next-auth/react'; import { CommonHeader } from '@/components/layout/CommonHeader'; import { Footer } from '@/components/layout/Footer'; import { cmsService } from '@/services/cms.service'; @@ -82,6 +83,9 @@ const defaultCta: AboutCtaContent = { // --------------------------------------------------------------------------- export default function AboutPage() { + const { data: session } = useSession(); + const isAgent = (session?.user as any)?.role === 'AGENT'; + const [hero, setHero] = useState(defaultHero); const [stats, setStats] = useState(defaultStats); const [features, setFeatures] = useState(defaultFeatures); @@ -151,10 +155,10 @@ export default function AboutPage() { {/* CTA Button */} - {hero.ctaButtonText} + {isAgent ? 'Go to Dashboard' : hero.ctaButtonText} @@ -281,16 +285,16 @@ export default function AboutPage() {

- {cta.title} + {isAgent ? 'Manage your profile' : cta.title}

- {cta.description} + {isAgent ? 'Keep your profile updated and connect with potential clients.' : cta.description}

- {cta.buttonText} + {isAgent ? 'Go to Dashboard' : cta.buttonText}