diff --git a/src/user/views/adsManager/views/advanced/components/campaign/CampaignSettings.tsx b/src/user/views/adsManager/views/advanced/components/campaign/CampaignSettings.tsx index b66c0cc5f..2d22ec454 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/CampaignSettings.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/CampaignSettings.tsx @@ -4,8 +4,13 @@ import { CardContainer } from "components/Card/CardContainer"; import { CampaignDateRange } from "components/Campaigns/CampaignDateRange"; import { LocationField } from "user/views/adsManager/views/advanced/components/campaign/fields/LocationField"; import { Typography } from "@mui/material"; +import { useFormikContext } from "formik"; +import { CampaignForm } from "user/views/adsManager/types"; export function CampaignSettings(props: { isEdit: boolean }) { + const { values } = useFormikContext(); + const isEdit = props.isEdit && values.state !== "draft"; + return ( <> @@ -15,10 +20,10 @@ export function CampaignSettings(props: { isEdit: boolean }) { - + - {!props.isEdit && } + {!isEdit && } ); }