From 68f9db2c7fea73c35a9c49924acaf13e4caaff09 Mon Sep 17 00:00:00 2001 From: Rebe R <36491300+rebecarubio@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:53:50 +0200 Subject: [PATCH] refactor ZUIPersonAvatar to use ZUIAvatar --- src/zui/ZUIPersonAvatar/index.tsx | 40 ++++++++++--------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/src/zui/ZUIPersonAvatar/index.tsx b/src/zui/ZUIPersonAvatar/index.tsx index 3ea4269a41..a202ae7a81 100644 --- a/src/zui/ZUIPersonAvatar/index.tsx +++ b/src/zui/ZUIPersonAvatar/index.tsx @@ -1,37 +1,23 @@ /* eslint-disable react/display-name */ -import { Avatar } from '@mui/material'; -import { forwardRef } from 'react'; +import ZUIAvatar from 'zui/ZUIAvatar'; interface ZUIPersonAvatarProps { orgId: number; personId: number; - isUserAvatar?: boolean; size?: 'sm' | 'md' | 'lg'; } -const SIZES = { - lg: 50, - md: 40, - sm: 30, -}; -const ZUIPersonAvatar = forwardRef( - ( - { orgId, personId, isUserAvatar = false, size = 'md', ...restProps }, - ref - ) => { - return ( - - ); - } -); +const ZUIPersonAvatar: React.FC = ({ + orgId, + personId, + size = 'md', +}) => { + return ( + + ); +}; export default ZUIPersonAvatar;