Skip to content

Commit

Permalink
fixed generate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov committed Jun 18, 2024
1 parent 1ebc6c5 commit e6067a7
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,12 @@ const SetupCampaign = ({ hierarchyType }) => {
hierarchyType: hierarchyType,
hierarchy: hierarchyDefinition?.BoundaryHierarchy?.[0],
});
} else if (hierarchyDefinition?.BoundaryHierarchy?.[0]) {
}
}, [isBoundaryLoading, isFacilityLoading, isUserLoading, facilityId, boundaryId, userId, hierarchyDefinition?.BoundaryHierarchy?.[0], draftData]); // Only run if dataParams changes


useEffect(() => {
if (hierarchyDefinition?.BoundaryHierarchy?.[0]) {
setDataParams({
...dataParams,
facilityId: facilityId,
Expand All @@ -467,8 +472,7 @@ const SetupCampaign = ({ hierarchyType }) => {
isUserLoading,
});
}
}, [isBoundaryLoading, isFacilityLoading, isUserLoading, facilityId, boundaryId, userId, hierarchyDefinition?.BoundaryHierarchy?.[0], draftData]); // Only run if dataParams changes

}, [isBoundaryLoading, isFacilityLoading, isUserLoading, facilityId, boundaryId, userId, hierarchyDefinition?.BoundaryHierarchy?.[0], draftData]);
useEffect(() => {
setCampaignConfig(CampaignConfig(totalFormData, dataParams, isSubmitting, summaryErrors));
}, [totalFormData, dataParams, isSubmitting, summaryErrors]);
Expand Down

0 comments on commit e6067a7

Please sign in to comment.