forked from p15670423/monkey
UI: Rename saveConfig to tryImport in ImportConfigModal.tsx
tryImport better reflects what the function is doing
This commit is contained in:
parent
f75f1ced68
commit
9f0169e812
|
@ -38,11 +38,11 @@ const ConfigImportModal = (props: Props) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (configContents !== null) {
|
||||
saveConfig();
|
||||
tryImport();
|
||||
}
|
||||
}, [configContents, unsafeOptionsVerified])
|
||||
|
||||
function saveConfig() {
|
||||
function tryImport() {
|
||||
if (configEncrypted && !showPassword){
|
||||
setShowPassword(true);
|
||||
} else if (configEncrypted && showPassword) {
|
||||
|
@ -178,7 +178,7 @@ const ConfigImportModal = (props: Props) => {
|
|||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
<Button variant={'info'}
|
||||
onClick={saveConfig}
|
||||
onClick={tryImport}
|
||||
disabled={isImportDisabled()}>
|
||||
Import
|
||||
</Button>
|
||||
|
|
Loading…
Reference in New Issue