Fix modal text on username gone error
This commit is contained in:
parent
74097a0efa
commit
64827af27f
3 changed files with 6 additions and 2 deletions
|
@ -281,7 +281,7 @@ export function EditUsernameModalBody({
|
|||
}}
|
||||
>
|
||||
{i18n('icu:ProfileEditor--username--reservation-gone', {
|
||||
username: currentUsername,
|
||||
username: reservation?.username ?? nickname,
|
||||
})}
|
||||
</ConfirmationDialog>
|
||||
)}
|
||||
|
|
|
@ -433,6 +433,7 @@ export function reducer(
|
|||
return {
|
||||
...state,
|
||||
usernameReservation: {
|
||||
reservation: state.usernameReservation.reservation,
|
||||
state: UsernameReservationState.Open,
|
||||
error: UsernameReservationError.ConflictOrGone,
|
||||
},
|
||||
|
|
|
@ -389,7 +389,10 @@ describe('electron/state/ducks/username', () => {
|
|||
getUsernameReservationState(state),
|
||||
UsernameReservationState.Open
|
||||
);
|
||||
assert.strictEqual(getUsernameReservationObject(state), undefined);
|
||||
assert.strictEqual(
|
||||
getUsernameReservationObject(state),
|
||||
DEFAULT_RESERVATION
|
||||
);
|
||||
assert.strictEqual(
|
||||
getUsernameReservationError(state),
|
||||
UsernameReservationError.ConflictOrGone
|
||||
|
|
Loading…
Reference in a new issue