From 2fccc0a5e358365a05d87d2ece46519daf092af8 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Thu, 26 Mar 2026 15:00:52 +0530 Subject: [PATCH] fix --- src/components/profile/ProfileCard.tsx | 57 ++++++++++++++------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/src/components/profile/ProfileCard.tsx b/src/components/profile/ProfileCard.tsx index c2d9fbd..5eb8480 100644 --- a/src/components/profile/ProfileCard.tsx +++ b/src/components/profile/ProfileCard.tsx @@ -158,33 +158,36 @@ export function ProfileCard({ {/* Action Buttons */}
- {messageHref ? ( - handleActionClick(e, messageHref)} - className="flex items-center gap-2 px-4 py-1.5 bg-[#e58625] text-[#00293d] text-sm font-normal rounded-[15px] border border-[#00293d]/10 hover:bg-[#d47720] transition-colors font-serif cursor-pointer" - > - Message - Message - - ) : ( - + {/* Message button - only enabled when connected */} + {(showEditButton || connectionStatus === 'ACCEPTED') && ( + messageHref ? ( + handleActionClick(e, messageHref)} + className="flex items-center gap-2 px-4 py-1.5 bg-[#e58625] text-[#00293d] text-sm font-normal rounded-[15px] border border-[#00293d]/10 hover:bg-[#d47720] transition-colors font-serif cursor-pointer" + > + Message + Message + + ) : ( + + ) )} {showEditButton && requestsHref ? ( // Agent's own profile - show Requests link with badge