UI: Simplify config import request handling

Statement if showPassword then showPassword is redundant
This commit is contained in:
vakarisz 2022-06-30 12:11:47 +03:00
parent 565f02a534
commit f75f1ced68
1 changed files with 2 additions and 6 deletions

View File

@ -78,12 +78,8 @@ const ConfigImportModal = (props: Props) => {
).then(res => res.json())
.then(res => {
if (res['import_status'] === 'invalid_configuration') {
if(showPassword){
setShowPassword(true);
} else {
setUploadStatus(UploadStatuses.error);
setErrorMessage(res['message']);
}
setUploadStatus(UploadStatuses.error);
setErrorMessage(res['message']);
} else if (res['import_status'] === 'imported') {
resetState();
props.onClose(true);