@@ -52,7 +52,7 @@ type AvatarProps = {
52
52
name ?: string ;
53
53
54
54
/** Optional account id if it's user avatar or policy id if it's workspace avatar */
55
- accountID ?: number | string ;
55
+ avatarID ?: number | string ;
56
56
} ;
57
57
58
58
function Avatar ( {
@@ -66,7 +66,7 @@ function Avatar({
66
66
fallbackIconTestID = '' ,
67
67
type = CONST . ICON_TYPE_AVATAR ,
68
68
name = '' ,
69
- accountID ,
69
+ avatarID ,
70
70
} : AvatarProps ) {
71
71
const theme = useTheme ( ) ;
72
72
const styles = useThemeStyles ( ) ;
@@ -86,15 +86,15 @@ function Avatar({
86
86
const iconStyle = imageStyles ? [ StyleUtils . getAvatarStyle ( size ) , styles . bgTransparent , imageStyles ] : undefined ;
87
87
88
88
// We pass the color styles down to the SVG for the workspace and fallback avatar.
89
- const source = isWorkspace ? originalSource : UserUtils . getAvatar ( originalSource , Number ( accountID ) ) ;
89
+ const source = isWorkspace ? originalSource : UserUtils . getAvatar ( originalSource , Number ( avatarID ) ) ;
90
90
const useFallBackAvatar = imageError || ! source || source === Expensicons . FallbackAvatar ;
91
91
const fallbackAvatar = isWorkspace ? ReportUtils . getDefaultWorkspaceAvatar ( name ) : fallbackIcon || Expensicons . FallbackAvatar ;
92
92
const fallbackAvatarTestID = isWorkspace ? ReportUtils . getDefaultWorkspaceAvatarTestID ( name ) : fallbackIconTestID || 'SvgFallbackAvatar Icon' ;
93
93
const avatarSource = useFallBackAvatar ? fallbackAvatar : source ;
94
94
95
95
let iconColors ;
96
96
if ( isWorkspace ) {
97
- iconColors = StyleUtils . getDefaultWorkspaceAvatarColor ( accountID ?. toString ( ) ?? '' ) ;
97
+ iconColors = StyleUtils . getDefaultWorkspaceAvatarColor ( avatarID ?. toString ( ) ?? '' ) ;
98
98
} else if ( useFallBackAvatar ) {
99
99
iconColors = StyleUtils . getBackgroundColorAndFill ( theme . buttonHoveredBG , theme . icon ) ;
100
100
} else {
0 commit comments