fix: Hide copy password if it is not available. Fixes #7783

This commit is contained in:
damencho 2020-11-05 11:43:48 -06:00 committed by Дамян Минков
parent 9fa29d7353
commit 4fdd4b66f7
1 changed files with 9 additions and 3 deletions

View File

@ -154,9 +154,15 @@ function PasswordSection({
<a
className = 'remove-password'
onClick = { onPasswordRemove }>{ t('dialog.Remove') }</a>
<a
className = 'copy-password'
onClick = { onPasswordCopy }>{ t('dialog.copy') }</a>
{
// There are cases like lobby and grant moderator when password is not available
password ? <>
<a
className = 'copy-password'
onClick = { onPasswordCopy }>{ t('dialog.copy') }</a>
</> : null
}
</>
);
}