From cc66746853eb25c69f833c894118e48a9e06cb16 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Fri, 11 Aug 2023 12:49:15 +0300 Subject: [PATCH] TAL-50 - update address in talent search results card --- .../src/components/talent-card/TalentCard.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/apps/talent-search/src/components/talent-card/TalentCard.tsx b/src/apps/talent-search/src/components/talent-card/TalentCard.tsx index bdb573f08..2da3e12b4 100644 --- a/src/apps/talent-search/src/components/talent-card/TalentCard.tsx +++ b/src/apps/talent-search/src/components/talent-card/TalentCard.tsx @@ -40,6 +40,7 @@ const TalentCard: FC = props => { const skillsWrapRef = useRef(null) const talentRoute = `${TALENT_SEARCH_PATHS.talent}/${props.member.handle}` const isMatchingSkill = useIsMatchingSkill(props.queriedSkills) + const address = props.member.addresses?.[0] ?? {} const matchedSkills = useMemo(() => ( orderBy( @@ -102,17 +103,14 @@ const TalentCard: FC = props => { {props.member.handle} - {props.member.addresses?.map(addr => ( -
+ {(!!props.member.addresses?.length || !!props.member.homeCountryCode) && ( +
- {getAddrString(addr.city, getCountry(props.member.homeCountryCode))} + {getAddrString(address.city, getCountry(props.member.homeCountryCode))}
- ))} + )}