forked from p15670423/monkey
UI: Simplify config import request handling
Statement if showPassword then showPassword is redundant
This commit is contained in:
parent
565f02a534
commit
f75f1ced68
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue