Skip to content

Commit

Permalink
Fix: migrate deprecated MUI APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Feb 13, 2025
1 parent c081626 commit 685f5dc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 9 deletions.
38 changes: 33 additions & 5 deletions backend/src/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,12 @@ const Avatar = ({
}}
badgeContent={(
<Tooltip title={commonStrings.VERIFIED}>
<Box borderRadius="50%" className={size ? `user-avatar-verified-${size}` : 'user-avatar-verified-medium'}>
<Box
sx={{
borderRadius: '50%',
}}
className={size ? `user-avatar-verified-${size}` : 'user-avatar-verified-medium'}
>
<VerifiedIcon className={size ? `user-avatar-verified-icon-${size}` : 'user-avatar-verified-icon-medium'} />
</Box>
</Tooltip>
Expand All @@ -491,7 +496,13 @@ const Avatar = ({
<></>
) : (
<Tooltip title={commonStrings.DELETE_IMAGE}>
<Box borderRadius="50%" className="avatar-action-box" onClick={handleDeleteAvatar}>
<Box
sx={{
borderRadius: '50%',
}}
className="avatar-action-box"
onClick={handleDeleteAvatar}
>
<DeleteIcon className="avatar-action-icon" />
</Box>
</Tooltip>
Expand All @@ -507,7 +518,13 @@ const Avatar = ({
className={type === movininTypes.RecordType.Agency ? 'agency-avatar' : ''}
badgeContent={(
<Tooltip title={commonStrings.UPLOAD_IMAGE}>
<Box borderRadius="50%" className="avatar-action-box" onClick={handleUpload}>
<Box
sx={{
borderRadius: '50%',
}}
className="avatar-action-box"
onClick={handleUpload}
>
<PhotoCameraIcon className="avatar-action-icon" />
</Box>
</Tooltip>
Expand Down Expand Up @@ -550,7 +567,12 @@ const Avatar = ({
}}
badgeContent={(
<Tooltip title={commonStrings.VERIFIED}>
<Box borderRadius="50%" className={size ? `user-avatar-verified-${size}` : 'user-avatar-verified-medium'}>
<Box
sx={{
borderRadius: '50%',
}}
className={size ? `user-avatar-verified-${size}` : 'user-avatar-verified-medium'}
>
<VerifiedIcon className={size ? `user-avatar-verified-icon-${size}` : 'user-avatar-verified-icon-medium'} />
</Box>
</Tooltip>
Expand Down Expand Up @@ -578,7 +600,13 @@ const Avatar = ({
}}
badgeContent={(
<Tooltip title={commonStrings.UPLOAD_IMAGE}>
<Box borderRadius="50%" className="avatar-action-box" onClick={handleUpload}>
<Box
sx={{
borderRadius: '50%',
}}
className="avatar-action-box"
onClick={handleUpload}
>
<PhotoCameraIcon className="avatar-action-icon" />
</Box>
</Tooltip>
Expand Down
24 changes: 21 additions & 3 deletions frontend/src/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,13 @@ const Avatar = ({
horizontal: 'right',
}}
badgeContent={(
<Box borderRadius="50%" className="avatar-action-box" onClick={handleDeleteAvatar}>
<Box
className="avatar-action-box"
onClick={handleDeleteAvatar}
sx={{
borderRadius: '50%',
}}
>
<DeleteIcon className="avatar-action-icon" />
</Box>
)}
Expand All @@ -195,7 +201,13 @@ const Avatar = ({
horizontal: 'right',
}}
badgeContent={(
<Box borderRadius="50%" className="avatar-action-box" onClick={handleUpload}>
<Box
className="avatar-action-box"
onClick={handleUpload}
sx={{
borderRadius: '50%',
}}
>
<PhotoCameraIcon className="avatar-action-icon" />
</Box>
)}
Expand All @@ -212,7 +224,13 @@ const Avatar = ({
}}
badgeContent={(
<div>
<Box borderRadius="50%" className="avatar-action-box" onClick={handleUpload}>
<Box
className="avatar-action-box"
onClick={handleUpload}
sx={{
borderRadius: '50%',
}}
>
<PhotoCameraIcon className={user.language === 'ar' ? 'avatar-action-icon-rtl' : 'avatar-action-icon'} />
</Box>
</div>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/MapDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ const MapDialog = ({
}}
>
<DialogTitle>
<Box display="flex" justifyContent="flex-end">
<Box
sx={{
display: 'flex',
justifyContent: 'flex-end',
}}
>
<Box>
<IconButton
className="close-btn"
Expand Down

0 comments on commit 685f5dc

Please sign in to comment.