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 => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res['import_status'] === 'invalid_configuration') {
|
if (res['import_status'] === 'invalid_configuration') {
|
||||||
if(showPassword){
|
|
||||||
setShowPassword(true);
|
|
||||||
} else {
|
|
||||||
setUploadStatus(UploadStatuses.error);
|
setUploadStatus(UploadStatuses.error);
|
||||||
setErrorMessage(res['message']);
|
setErrorMessage(res['message']);
|
||||||
}
|
|
||||||
} else if (res['import_status'] === 'imported') {
|
} else if (res['import_status'] === 'imported') {
|
||||||
resetState();
|
resetState();
|
||||||
props.onClose(true);
|
props.onClose(true);
|
||||||
|
|
Loading…
Reference in New Issue