diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js --- a/native/profile/relationship-list-item.react.js +++ b/native/profile/relationship-list-item.react.js @@ -48,6 +48,7 @@ import { useSelector } from '../redux/redux-utils.js'; import { type Colors, useColors, useStyles } from '../themes/colors.js'; import type { VerticalBounds } from '../types/layout-types.js'; +import { useNavigateToUserProfileBottomSheet } from '../user-profile/user-profile-utils.js'; import Alert from '../utils/alert.js'; type BaseProps = { @@ -74,6 +75,7 @@ +overlayContext: ?OverlayContextType, // withKeyboardState +keyboardState: ?KeyboardState, + +navigateToUserProfileBottomSheet: (userID: string) => mixed, }; class RelationshipListItem extends React.PureComponent { editButton = React.createRef>(); @@ -167,15 +169,24 @@ return ( - - - {this.props.userInfo.username} - + + + + {this.props.userInfo.username} + + {editButton} ); } + onPressUser = () => { + this.props.navigateToUserProfileBottomSheet(this.props.userInfo.id); + }; + onSelect = () => { const { id, username } = this.props.userInfo; this.props.onSelect({ id, username }); @@ -277,6 +288,10 @@ borderBottom: { borderBottomWidth: 1, }, + userInfoContainer: { + flex: 1, + flexDirection: 'row', + }, buttonContainer: { flexDirection: 'row', }, @@ -322,6 +337,9 @@ const overlayContext = React.useContext(OverlayContext); const keyboardState = React.useContext(KeyboardContext); + const navigateToUserProfileBottomSheet = + useNavigateToUserProfileBottomSheet(); + return ( ); });