fix(striker-ui): don't fetch if fatal error in PrepareNetworkForm

main
Tsu-ba-me 2 years ago
parent 9067dc87d4
commit fae3bbf236
  1. 4
      striker-ui/components/PrepareNetworkForm.tsx

@ -78,7 +78,7 @@ const PrepareNetworkForm = withRouter(
}, [dataHostDetail, fatalErrorMessage, isLoading, panelHeaderElement]); }, [dataHostDetail, fatalErrorMessage, isLoading, panelHeaderElement]);
useEffect(() => { useEffect(() => {
if (isReady) { if (isReady && !fatalErrorMessage) {
if (queryHostUUID) { if (queryHostUUID) {
api api
.get<APIHostDetail>( .get<APIHostDetail>(
@ -102,7 +102,7 @@ const PrepareNetworkForm = withRouter(
.finally(() => { .finally(() => {
setIsLoading(false); setIsLoading(false);
}); });
} else if (!fatalErrorMessage) { } else {
setFatalErrorMessage({ setFatalErrorMessage({
children: `No host UUID provided; cannot continue.`, children: `No host UUID provided; cannot continue.`,
type: 'error', type: 'error',

Loading…
Cancel
Save