Stabilize discovered SSH host row callback
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
3c32bc8fd1
commit
ce5a9bbd15
3 files changed
+7
-1
No files matched your search
@@ -1905,6 +1905,12 @@ export function ConnectionsSettings() {
|
||||
},
|
||||
[savedBackendMode, savedDesktopSshEnvironmentsByAlias],
|
||||
);
|
||||
const connectDiscoveredSshHost = useCallback(
|
||||
(target: DesktopDiscoveredSshHost) => {
|
||||
void handleConnectSshHost(target);
|
||||
},
|
||||
[handleConnectSshHost],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!desktopBridge || !addBackendDialogOpen || savedBackendMode !== "ssh") {
|
||||
@@ -2284,7 +2290,7 @@ export function ConnectionsSettings() {
|
||||
key={`${target.alias}:${target.hostname}:${target.port ?? ""}`}
|
||||
target={target}
|
||||
connectingHostAlias={connectingSshHostAlias}
|
||||
onConnect={(nextTarget) => void handleConnectSshHost(nextTarget)}
|
||||
onConnect={connectDiscoveredSshHost}
|
||||
/>
|
||||
))}
|
||||
{hasLoadedDiscoveredSshHosts &&
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user