Skip to content

Commit

Permalink
fixed HLM-5970
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov committed May 22, 2024
1 parent 434a42f commit 789d740
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ const SetupCampaign = () => {
useEffect(() => {
setTimeout(() => {
setEnabled(fetchUpload || (fetchBoundary && currentKey > 6));
},3000);
}, 3000);

// return () => clearTimeout(timeoutId);
}, [fetchUpload,fetchBoundary,currentKey]);
}, [fetchUpload, fetchBoundary, currentKey]);

const { data: facilityId, isLoading: isFacilityLoading, refetch: refetchFacility } = Digit.Hooks.campaign.useGenerateIdCampaign({
type: "facilityWithBoundary",
Expand All @@ -393,9 +393,9 @@ const SetupCampaign = () => {
// config: {
// enabled: setTimeout(fetchUpload || (fetchBoundary && currentKey > 6)),
// },
config:{
enabled: enabled
}
config: {
enabled: enabled,
},
});

// useEffect(() => {
Expand All @@ -412,9 +412,9 @@ const SetupCampaign = () => {
// config: {
// enabled: fetchUpload || (fetchBoundary && currentKey > 6),
// },
config:{
enabled: enabled
}
config: {
enabled: enabled,
},
});

const { data: userId, isLoading: isUserLoading, refetch: refetchUser } = Digit.Hooks.campaign.useGenerateIdCampaign({
Expand All @@ -424,9 +424,9 @@ const SetupCampaign = () => {
// config: {
// enabled: fetchUpload || (fetchBoundary && currentKey > 6),
// },
config:{
enabled: enabled
}
config: {
enabled: enabled,
},
});

useEffect(() => {
Expand Down Expand Up @@ -732,6 +732,8 @@ const SetupCampaign = () => {
}
},
});
} else {
setCurrentKey(currentKey + 1);
}
};

Expand Down

0 comments on commit 789d740

Please sign in to comment.