Skip to content

Commit

Permalink
Merge pull request #2376 from pcbailey/bug-default-ssh-key-not-in-use…
Browse files Browse the repository at this point in the history
…r-settings-list

CNV-55048: Fix display of default SSH settings list
  • Loading branch information
openshift-merge-bot[bot] authored Jan 21, 2025
2 parents 7346b26 + 3803eaf commit 19fa843
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ const useSSHAuthKeys: UseSSHAuthKeys = () => {
useKubevirtUserSettings('ssh');

const [authKeyRows, setAuthKeyRows] = useState<AuthKeyRow[]>([initialAuthKeyRow]);
const [isInitEffect, setIsInitEffect] = useState<boolean>(true);
const [loading, setLoading] = useState<boolean>(true);

useEffect(() => {
if (loadedSettings && isInitEffect) {
if (loadedSettings) {
if (!isEmpty(authorizedSSHKeys)) {
const authRows: AuthKeyRow[] = Object.entries(authorizedSSHKeys).map(
([projectName, secretName], id) => ({
Expand All @@ -64,10 +63,8 @@ const useSSHAuthKeys: UseSSHAuthKeys = () => {
} else {
setLoading(false);
}

setIsInitEffect(false);
}
}, [loadedSettings, authorizedSSHKeys, isInitEffect]);
}, [loadedSettings, authorizedSSHKeys]);

const { loaded, selectableProjects } = useSSHAuthProjects(authKeyRows);

Expand Down

0 comments on commit 19fa843

Please sign in to comment.