Skip to content

Commit

Permalink
fix edit campaign hook deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopaunov committed Jul 29, 2024
1 parent 9963f14 commit 55ba16a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/EditCampaign/EditCampaign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ const EditCampaign = ({
const handleConfirmBtnClicked = useCallback(async () => {
modals.closeAll()
blockerProceed()
}, [blockerProceed, modals])
}, [blockerProceed])

const handleCancelBtnClicked = useCallback(() => {
modals.closeAll()
blocker.reset?.()
setOpenedModal(false)
}, [blocker, modals])
}, [blocker])

const form = useForm<FormProps>({
initialValues: {
Expand Down Expand Up @@ -188,12 +188,12 @@ const EditCampaign = ({

const catSelectedRadioAndValuesArray = useMemo(
() => campaign && findArrayWithLengthInObjectAsValue(campaign.targetingInput.inputs.categories),
[campaign, findArrayWithLengthInObjectAsValue]
[campaign]
)

const locSelectedRadioAndValuesArray = useMemo(
() => campaign && findArrayWithLengthInObjectAsValue(campaign.targetingInput.inputs.location),
[campaign, findArrayWithLengthInObjectAsValue]
[campaign]
)

const handleCategories = useCallback(
Expand All @@ -204,7 +204,7 @@ const EditCampaign = ({
)
form.validateField('targetingInput.inputs.categories')
},
[campaign, updateCatsLocsObject]
[form]
)

const handleCountries = useCallback(
Expand All @@ -215,7 +215,7 @@ const EditCampaign = ({
)
form.validateField('targetingInput.inputs.location')
},
[campaign, updateCatsLocsObject]
[form]
)

const editCampaign = useCallback(
Expand Down Expand Up @@ -271,7 +271,7 @@ const EditCampaign = ({
})
.catch(() => showNotification('error', "Couldn't update the Campaign data!"))
},
[adexServicesRequest, parseToBigNumPrecision, form]
[balanceToken.decimals, adexServicesRequest, campaign.id, form, showNotification, onAfterSubmit]
)

if (!campaign) return <div>Invalid Campaign ID</div>
Expand Down

0 comments on commit 55ba16a

Please sign in to comment.