Skip to content

Commit

Permalink
(bugfix) fix useEffect missing dependancy array warnings for gcp and …
Browse files Browse the repository at this point in the history
…aws connections
  • Loading branch information
AHarmlessPyro committed Sep 4, 2022
1 parent b9ed745 commit 4fb13ce
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const InstanceSelection: React.FC<KeySetupInterface> = ({
})

const toast = useToast()

useEffect(() => {
if (isCurrent) {
setLoadingState(true)
Expand All @@ -66,7 +67,8 @@ const InstanceSelection: React.FC<KeySetupInterface> = ({
})
.finally(() => setLoadingState(false))
}
}, [selectedInstanceSpecs, isCurrent])
}, [selectedInstanceSpecs, toast, isCurrent, id, setLoadingState])

if (instances != null) {
return (
<Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const OsSelection: React.FC<KeySetupInterface> = ({
})
.catch(err => {})
}
}, [isCurrent])
}, [isCurrent, id])

if (OSChoices != null) {
return (
<Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const SourceMigConfig: React.FC<KeySetupInterface> = ({
console.warn(err)
})
}
}, [isSelected])
}, [isSelected, id, toast])

return (
<Grid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const GenericStep: React.FC<GenericStepAWSInterface> = ({
if (isCurrent) {
complete({})
}
}, [isCurrent])
}, [isCurrent, complete])

return (
<Flex w={"full"} h={"full"} justify={"center"} mt={8}>
<Spinner size={"xl"} />
Expand Down

0 comments on commit 4fb13ce

Please sign in to comment.