fix: pass all params to enabled of RQ if necessary
This commit is contained in:
@@ -15,7 +15,7 @@ export default function useActionSubsteps({ appKey, actionKey }) {
|
||||
|
||||
return data;
|
||||
},
|
||||
enabled: !!appKey,
|
||||
enabled: !!appKey && !!actionKey,
|
||||
});
|
||||
|
||||
return query;
|
||||
|
@@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
import api from 'helpers/api';
|
||||
|
||||
export default function useSamlAuthProvider({ samlAuthProviderId }) {
|
||||
export default function useSamlAuthProvider({ samlAuthProviderId } = {}) {
|
||||
const query = useQuery({
|
||||
queryKey: ['samlAuthProvider', samlAuthProviderId],
|
||||
queryFn: async ({ signal }) => {
|
||||
|
@@ -15,7 +15,7 @@ export default function useTriggerSubsteps({ appKey, triggerKey }) {
|
||||
|
||||
return data;
|
||||
},
|
||||
enabled: !!appKey,
|
||||
enabled: !!appKey && !!triggerKey,
|
||||
});
|
||||
|
||||
return query;
|
||||
|
@@ -11,7 +11,7 @@ function AuthenticationPage() {
|
||||
const formatMessage = useFormatMessage();
|
||||
|
||||
const { data: adminSamlAuthProviders } = useAdminSamlAuthProviders();
|
||||
const samlAuthProviderId = adminSamlAuthProviders?.data?.[0].id;
|
||||
const samlAuthProviderId = adminSamlAuthProviders?.data?.[0]?.id;
|
||||
|
||||
const { data, isLoading: isProviderLoading } = useSamlAuthProvider({
|
||||
samlAuthProviderId,
|
||||
|
Reference in New Issue
Block a user