Username recovery improvements

This commit is contained in:
Fedor Indutny 2024-02-06 10:35:59 -08:00 committed by GitHub
parent a70ae1060d
commit 533a1b32d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 423 additions and 99 deletions

View file

@ -25,9 +25,11 @@ import { selectRecentEmojis } from '../selectors/emojis';
import {
getUsernameEditState,
getUsernameLinkState,
getUsernameLinkRecovered,
} from '../selectors/username';
function renderEditUsernameModalBody(props: {
isRootModal: boolean;
onClose: () => void;
}): JSX.Element {
return <SmartEditUsernameModalBody {...props} />;
@ -46,7 +48,6 @@ function mapStateToProps(
firstName,
familyName,
id: conversationId,
phoneNumber,
username,
} = getMe(state);
const recentEmojis = selectRecentEmojis(state);
@ -56,6 +57,7 @@ function mapStateToProps(
getHasCompletedUsernameLinkOnboarding(state);
const usernameEditState = getUsernameEditState(state);
const usernameLinkState = getUsernameLinkState(state);
const usernameLinkRecovered = getUsernameLinkRecovered(state);
const usernameLinkColor = getUsernameLinkColor(state);
const usernameLink = getUsernameLink(state);
const usernameCorrupted = getUsernameCorrupted(state);
@ -76,7 +78,6 @@ function mapStateToProps(
isUsernameFlagEnabled,
recentEmojis,
skinTone,
phoneNumber,
userAvatarData,
username,
usernameCorrupted,
@ -84,6 +85,7 @@ function mapStateToProps(
usernameLinkState,
usernameLinkColor,
usernameLinkCorrupted,
usernameLinkRecovered,
usernameLink,
renderEditUsernameModalBody,