diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index 9fcde2ab8518..cb56b27b482d 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -51,59 +51,57 @@ const AvatarWithDisplayName = (props) => { const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForLogins([props.report.ownerEmail], props.personalDetails); const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(ownerPersonalDetails, false); return ( - - - {Boolean(props.report && title) && ( - + {Boolean(props.report && title) && ( + + {isExpenseReport ? ( + + ) : ( + + )} + + + {!_.isEmpty(subtitle) && ( + - {isExpenseReport ? ( - - ) : ( - - )} - - - {!_.isEmpty(subtitle) && ( - - {subtitle} - - )} - - - )} + {subtitle} + + )} + + )} ); }; diff --git a/src/components/HeaderWithCloseButton.js b/src/components/HeaderWithCloseButton.js index f47874411f24..8bfe6c582c7d 100755 --- a/src/components/HeaderWithCloseButton.js +++ b/src/components/HeaderWithCloseButton.js @@ -96,10 +96,6 @@ const propTypes = { /** Policies, if we're showing the details for a report and need participant details for AvatarWithDisplay */ personalDetails: PropTypes.objectOf(participantPropTypes), - /** Additional styles to render on the container of this component */ - // eslint-disable-next-line react/forbid-prop-types - containerStyles: PropTypes.arrayOf(PropTypes.object), - ...withLocalizePropTypes, ...withDelayToggleButtonStatePropTypes, ...keyboardStatePropTypes, @@ -130,7 +126,6 @@ const defaultProps = { top: 0, left: 0, }, - containerStyles: [], }; class HeaderWithCloseButton extends Component { @@ -155,7 +150,7 @@ class HeaderWithCloseButton extends Component { render() { return ( - + {this.props.shouldShowBackButton && ( - - { - if (this.props.isKeyboardShown) { - Keyboard.dismiss(); - } - this.props.onBackButtonPress(); - }} - style={[styles.touchableButtonImage]} - > - - - + + { + if (this.props.isKeyboardShown) { + Keyboard.dismiss(); + } + this.props.onBackButtonPress(); + }} + style={[styles.touchableButtonImage]} + > + + + )} {this.props.shouldShowAvatarWithDisplay && ( { report={props.report} policies={props.policies} personalDetails={props.personalDetails} - containerStyles={[styles.pt5, styles.pb3, styles.pr1]} shouldShowCloseButton={false} shouldShowBackButton={props.isSmallScreenWidth} onBackButtonPress={() => Navigation.navigate(ROUTES.HOME)}