Skip to content

Commit

Permalink
Select first agent of the agent's list the first time that table is l…
Browse files Browse the repository at this point in the history
…oaded (#69)

Signed-off-by: Montse Ortega <mortegag@redhat.com>
  • Loading branch information
ammont82 authored Jan 17, 2025
1 parent 6240e46 commit 1abe14e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/demo/src/migration-wizard/steps/connect/ConnectStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export const ConnectStep: React.FC = () => {

useEffect(() => {
if (!discoverySourcesContext.agentSelected && firstAgent) {
if (firstAgent.status === 'up-to-date') {
discoverySourcesContext.selectAgent(firstAgent);
}
discoverySourcesContext.selectAgent(firstAgent);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [firstAgent]);
Expand Down

0 comments on commit 1abe14e

Please sign in to comment.