From ff0a704deb1021bffe5783486fd7da56cafeaccd Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sun, 12 Apr 2026 12:31:59 +0530 Subject: [PATCH] feat: fetch and render dynamic agent types in footer service providers list --- src/components/layout/Footer.tsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index f9f34d4..8366417 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -1,16 +1,11 @@ 'use client'; +import { useEffect, useState } from 'react'; import Link from 'next/link'; import Image from 'next/image'; +import { agentsService, type AgentType } from '@/services/agents.service'; const footerLinks = { - serviceProviders: { - title: 'Service Providers', - links: [ - { label: 'Agent', href: '/user/profiles?listing=agents' }, - { label: 'Lenders', href: '/user/profiles?listing=lenders' }, - ], - }, resources: { title: 'Resources', links: [ @@ -76,6 +71,12 @@ const socialLinks = [ ]; export function Footer() { + const [agentTypes, setAgentTypes] = useState([]); + + useEffect(() => { + agentsService.getAgentTypes().then(setAgentTypes).catch(() => {}); + }, []); + return (