Skip to content

Commit

Permalink
Remove location from VC card
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanos committed Dec 19, 2024
1 parent cdf70f6 commit ea5abea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { DirectMessageDialog } from '@/domain/communication/messaging/DirectMessaging/DirectMessageDialog';
import GridProvider from '@/core/ui/grid/GridProvider';
import { CommunityContributorType } from '@/core/apollo/generated/graphql-schema';
import { gutters } from '@/core/ui/grid/utils';

type ContributorCardTooltip = {
tags: string[];
Expand Down Expand Up @@ -111,17 +112,19 @@ export const ContributorCardSquare = (props: ContributorCardSquareProps) => {
arrow
title={
<GridProvider columns={3}>
<UserCard
displayName={displayName}
avatarSrc={avatar}
avatarAltText={avatarAltText}
tags={tooltip?.tags ?? []}
roleName={roleName ?? tooltip?.roleName}
city={tooltip?.city}
country={tooltip?.country}
isContactable={isContactable}
onContact={() => setIsMessageUserDialogOpen(true)}
/>
<Box width={gutters(15)}>
<UserCard
displayName={displayName}
avatarSrc={avatar}
avatarAltText={avatarAltText}
tags={tooltip?.tags ?? []}
roleName={roleName ?? tooltip?.roleName}
city={tooltip?.city}
country={tooltip?.country}
isContactable={isContactable}
onContact={() => setIsMessageUserDialogOpen(true)}
/>
</Box>
</GridProvider>
}
classes={{ tooltip: styles.tooltip }}
Expand Down
15 changes: 8 additions & 7 deletions src/domain/community/user/userCard/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,17 @@ const UserCard = ({
>
<Caption fontSize={gutters(0.7)}>{displayName}</Caption>
{roleName && <InfoRow text={roleName} icon={PersonIcon} ariaLabel="Role name" loading={loading} />}
<InfoRow
text={location || t('components.profileSegment.location.noLocation')}
icon={LocationOnOutlinedIcon}
ariaLabel="Location"
loading={loading}
/>
{location && (
<InfoRow text={location} icon={LocationOnOutlinedIcon} ariaLabel={t('common.location')} loading={loading} />
)}
</BadgeCardView>
</Box>
<Box onClick={toggleExpanded} sx={{ cursor: 'pointer' }} paddingBottom={1}>
<ExpandableCardFooter expanded={isExpanded} tags={<TagsComponent tags={tags} loading={loading} />} />
<ExpandableCardFooter
expanded={isExpanded}
expandable={tags.length > 0}
tags={<TagsComponent tags={tags} loading={loading} />}
/>
</Box>
</ContributeCard>
);
Expand Down

0 comments on commit ea5abea

Please sign in to comment.