Skip to content

The open alternative to Salesforce, designed for AI.

Remove company avatar show page hover effect (#1857)

brendanlaschke1e402aca5fe5
diff --git a/front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx b/front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx
index 3ceb9c0a5b5..8ba72d6ba4a 100644
--- a/front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx
+++ b/front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx
@@ -92,7 +92,7 @@ export const ShowPageSummaryCard = ({
if (e.target.files) onUploadPicture?.(e.target.files[0]);
};
const handleAvatarClick = () => {
- if (onUploadPicture) inputFileRef?.current?.click?.();
+ inputFileRef?.current?.click?.();
};
return (
@@ -100,7 +100,7 @@ export const ShowPageSummaryCard = ({
<StyledAvatarWrapper>
<Avatar
avatarUrl={logoOrAvatar}
- onClick={handleAvatarClick}
+ onClick={onUploadPicture ? handleAvatarClick : undefined}
size="xl"
colorId={id}
placeholder={title}
diff --git a/front/src/modules/users/components/Avatar.tsx b/front/src/modules/users/components/Avatar.tsx
index a285dd1e1e4..3ee8aca2850 100644
--- a/front/src/modules/users/components/Avatar.tsx
+++ b/front/src/modules/users/components/Avatar.tsx
@@ -83,7 +83,8 @@ const StyledAvatar = styled.div<AvatarProps & { colorId: string }>`
}};
&:hover {
- box-shadow: 0 0 0 4px ${({ theme }) => theme.background.transparent.light};
+ box-shadow: ${({ theme, onClick }) =>
+ onClick ? '0 0 0 4px ' + theme.background.transparent.light : 'unset'};
}
`;