Username and username link integrity check

This commit is contained in:
Fedor Indutny 2023-11-03 23:05:11 +01:00 committed by GitHub
parent 1be90fff3d
commit 3664063d71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 636 additions and 35 deletions

View file

@ -15,15 +15,17 @@ import {
getUsernameReservationObject,
getUsernameReservationError,
} from '../selectors/username';
import { getUsernameCorrupted } from '../selectors/items';
import { getMe } from '../selectors/conversations';
function mapStateToProps(state: StateType): PropsDataType {
const i18n = getIntl(state);
const { username } = getMe(state);
const usernameCorrupted = getUsernameCorrupted(state);
return {
i18n,
currentUsername: username,
currentUsername: usernameCorrupted ? undefined : username,
minNickname: getMinNickname(),
maxNickname: getMaxNickname(),
state: getUsernameReservationState(state),