Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3492102
D6421.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6421.diff
View Options
diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -4,6 +4,7 @@
import { View, Text, Alert, Platform, ScrollView } from 'react-native';
import { logOutActionTypes, logOut } from 'lib/actions/user-actions';
+import { useStringForUser } from 'lib/hooks/ens-cache';
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';
import { accountHasPassword } from 'lib/shared/account-utils';
@@ -68,15 +69,10 @@
+dispatchActionPromise: DispatchActionPromise,
+logOut: (preRequestUserState: PreRequestUserState) => Promise<LogOutResult>,
+staffCanSee: boolean,
+ +stringForUser: ?string,
};
class ProfileScreen extends React.PureComponent<Props> {
- get username() {
- return this.props.currentUserInfo && !this.props.currentUserInfo.anonymous
- ? this.props.currentUserInfo.username
- : undefined;
- }
-
get loggedOutOrLoggingOut() {
return (
!this.props.currentUserInfo ||
@@ -134,7 +130,7 @@
<SingleLine
style={[this.props.styles.label, this.props.styles.username]}
>
- {this.username}
+ {this.props.stringForUser}
</SingleLine>
<Button
onPress={this.onPressLogOut}
@@ -360,6 +356,7 @@
const callLogOut = useServerCall(logOut);
const dispatchActionPromise = useDispatchActionPromise();
const staffCanSee = useStaffCanSee();
+ const stringForUser = useStringForUser(currentUserInfo);
return (
<ProfileScreen
@@ -372,6 +369,7 @@
logOut={callLogOut}
dispatchActionPromise={dispatchActionPromise}
staffCanSee={staffCanSee}
+ stringForUser={stringForUser}
/>
);
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 10:11 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679001
Default Alt Text
D6421.diff (1 KB)
Attached To
Mode
D6421: [native] Show your ENS name in ProfileScreen
Attached
Detach File
Event Timeline
Log In to Comment