@@ -6,6 +6,7 @@ import useAccountTabIndicatorStatus from '@hooks/useAccountTabIndicatorStatus';
66import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails' ;
77import useLocalize from '@hooks/useLocalize' ;
88import useOnyx from '@hooks/useOnyx' ;
9+ import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
910import useThemeStyles from '@hooks/useThemeStyles' ;
1011import CONST from '@src/CONST' ;
1112import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -32,6 +33,7 @@ function NavigationTabBarAvatar({onPress, isSelected = false, style}: Navigation
3233 const delegateEmail = account ?. delegatedAccess ?. delegate ?? '' ;
3334 const currentUserPersonalDetails = useCurrentUserPersonalDetails ( ) ;
3435 const emojiStatus = currentUserPersonalDetails ?. status ?. emojiCode ?? '' ;
36+ const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
3537 const { status} = useAccountTabIndicatorStatus ( ) ;
3638
3739 /**
@@ -76,12 +78,12 @@ function NavigationTabBarAvatar({onPress, isSelected = false, style}: Navigation
7678 wrapperStyle = { styles . flex1 }
7779 accessibilityState = { accountAccessibilityState }
7880 aria-selected = { accountAccessibilityState . selected }
79- style = { ( { hovered} ) => [ style , hovered && styles . navigationTabBarItemHovered ] }
81+ style = { ( { hovered} ) => [ style , ! shouldUseNarrowLayout && hovered && styles . navigationTabBarItemHovered ] }
8082 sentryLabel = { CONST . SENTRY_LABEL . NAVIGATION_TAB_BAR . ACCOUNT }
8183 >
8284 { ( { hovered} ) => (
8385 < >
84- { renderAvatar ( isSelected || hovered ) }
86+ { renderAvatar ( isSelected || ( ! shouldUseNarrowLayout && hovered ) ) }
8587 < Text style = { [ styles . textSmall , styles . textAlignCenter , isSelected ? styles . textBold : styles . textSupporting , styles . mt0Half , styles . navigationTabBarLabel ] } >
8688 { translate ( 'initialSettingsPage.account' ) }
8789 </ Text >
0 commit comments