UI: Rename saveConfig to tryImport in ImportConfigModal.tsx

tryImport better reflects what the function is doing
This commit is contained in:
vakarisz 2022-06-30 12:26:57 +03:00
parent f75f1ced68
commit 9f0169e812
1 changed files with 3 additions and 3 deletions

View File

@ -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>