diff --git a/native/user-profile/user-profile-relationship-button.react.js b/native/user-profile/user-profile-relationship-button.react.js --- a/native/user-profile/user-profile-relationship-button.react.js +++ b/native/user-profile/user-profile-relationship-button.react.js @@ -41,7 +41,10 @@ ); React.useLayoutEffect(() => { - if (otherUserInfo?.relationshipStatus === userRelationshipStatus.FRIEND) { + if ( + !otherUserInfo || + otherUserInfo.relationshipStatus === userRelationshipStatus.FRIEND + ) { setUserProfileRelationshipButtonHeight(0); } else if ( otherUserInfo?.relationshipStatus === @@ -56,6 +59,7 @@ setUserProfileRelationshipButtonHeight(userProfileActionButtonHeight); } }, [ + otherUserInfo, otherUserInfo?.relationshipStatus, setUserProfileRelationshipButtonHeight, ]);