Merge pull request #1723 from automatisch/remove-unused-payloads

refactor: remove unused payloads from RQ
This commit is contained in:
Ali BARIN
2024-03-15 13:53:45 +01:00
committed by GitHub
12 changed files with 34 additions and 28 deletions

View File

@@ -40,12 +40,14 @@ function AddNewAppConnection(props) {
const [appName, setAppName] = React.useState('');
const [isLoading, setIsLoading] = React.useState(false);
const { data: apps, mutate } = useLazyApps({
appName,
onSuccess: () => {
setIsLoading(false);
const { data: apps, mutate } = useLazyApps(
{ appName },
{
onSuccess: () => {
setIsLoading(false);
},
},
});
);
const fetchData = React.useMemo(() => debounce(mutate, 300), [mutate]);

View File

@@ -161,17 +161,17 @@ function FlowStep(props) {
({ key }) => key === step.key,
);
const { data: triggerSubsteps } = useTriggerSubsteps(
app?.key,
actionOrTrigger?.key,
);
const { data: triggerSubsteps } = useTriggerSubsteps({
appKey: app?.key,
triggerKey: actionOrTrigger?.key,
});
const triggerSubstepsData = triggerSubsteps?.data || [];
const { data: actionSubsteps } = useActionSubsteps(
app?.key,
actionOrTrigger?.key,
);
const { data: actionSubsteps } = useActionSubsteps({
appKey: app?.key,
actionKey: actionOrTrigger?.key,
});
const actionSubstepsData = actionSubsteps?.data || [];