mirror of
https://github.com/databasus/databasus.git
synced 2026-04-06 00:32:03 +02:00
FIX (sftp): Fix initial value in case of private key
This commit is contained in:
@@ -14,7 +14,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr
|
||||
const hasAdvancedValues = !!storage?.sftpStorage?.skipHostKeyVerify;
|
||||
const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);
|
||||
|
||||
const initialAuthMethod = storage?.sftpStorage?.privateKey !== undefined ? 'privateKey' : 'password';
|
||||
const initialAuthMethod = storage?.sftpStorage?.privateKey ? 'privateKey' : 'password';
|
||||
const [authMethod, setAuthMethod] = useState<'password' | 'privateKey'>(initialAuthMethod);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user