Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions apps/web/src/components/settings/ConnectionsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,22 @@ const DesktopSshHostRow = memo(function DesktopSshHostRow({
</div>
</div>
);
});
}, areDesktopSshHostRowPropsEqual);

function areDesktopSshHostRowPropsEqual(
previous: Readonly<DesktopSshHostRowProps>,
next: Readonly<DesktopSshHostRowProps>,
): boolean {
return (
previous.connectingHostAlias === next.connectingHostAlias &&
previous.onConnect === next.onConnect &&
previous.target.alias === next.target.alias &&
previous.target.hostname === next.target.hostname &&
previous.target.username === next.target.username &&
previous.target.port === next.target.port &&
previous.target.source === next.target.source
);
}

function CloudLinkSwitch({
checked,
Expand Down Expand Up @@ -2749,7 +2764,7 @@ export function ConnectionsSettings() {
key={`${target.alias}:${target.hostname}:${target.port ?? ""}`}
target={target}
connectingHostAlias={connectingSshHostAlias}
onConnect={(nextTarget) => void handleConnectSshHost(nextTarget)}
onConnect={handleConnectSshHost}
/>
))}
{hasLoadedDiscoveredSshHosts &&
Expand Down
Loading