Fix cursor should not be pointer when record image identifier is not Editable (#7320)

- This PR solves the issue Cursor should not be "pointer" when record
image identifier is not editable #7277

---------

Co-authored-by: Sachin KS <mac@apples-MacBook-Air.local>
This commit is contained in:
Sachin
2024-10-01 12:32:13 +05:30
committed by GitHub
parent ca027d6772
commit 0d570caff5

View File

@ -63,8 +63,9 @@ const StyledTitle = styled.div<{ isMobile: boolean }>`
max-width: 90%;
`;
const StyledAvatarWrapper = styled.div`
cursor: pointer;
const StyledAvatarWrapper = styled.div<{ isAvatarEditable: boolean }>`
cursor: ${({ isAvatarEditable }) =>
isAvatarEditable ? 'pointer' : 'default'};
`;
const StyledFileInput = styled.input`
@ -130,7 +131,7 @@ export const ShowPageSummaryCard = ({
return (
<StyledShowPageSummaryCard isMobile={isMobile}>
<StyledAvatarWrapper>
<StyledAvatarWrapper isAvatarEditable={!!onUploadPicture}>
<Avatar
avatarUrl={logoOrAvatar}
onClick={onUploadPicture ? handleAvatarClick : undefined}