Merge pull request #1790 from automatisch/AUT-907

fix: set loading false if there is no flowName
This commit is contained in:
Ali BARIN
2024-04-05 14:18:03 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import * as React from 'react';
import api from 'helpers/api';
import { useMutation } from '@tanstack/react-query';
export default function useLazyFlows({ flowName, page }, { onSuccess }) {
export default function useLazyFlows({ flowName, page }, { onSettled }) {
const abortControllerRef = React.useRef(new AbortController());
React.useEffect(() => {
@@ -23,7 +23,7 @@ export default function useLazyFlows({ flowName, page }, { onSuccess }) {
return data;
},
onSuccess,
onSettled,
});
return query;

View File

@@ -30,7 +30,7 @@ export default function Flows() {
const { data, mutate } = useLazyFlows(
{ flowName, page },
{
onSuccess: () => {
onSettled: () => {
setIsLoading(false);
},
},