Skip to content

Commit

Permalink
fix: hide segment config in news
Browse files Browse the repository at this point in the history
  • Loading branch information
IanKrieger committed Nov 6, 2023
1 parent 3770497 commit 98db640
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ import { Typography } from "@mui/material";
import { SegmentPicker } from "components/Segment/SegmentPicker";
import { PlatformPicker } from "components/Platform/PlatformPicker";
import { CardContainer } from "components/Card/CardContainer";
import { useField } from "formik";
import { CampaignFormat } from "graphql/types";

interface Props {
index: number;
}

export function PickerFields({ index }: Props) {
const [, format] = useField<CampaignFormat>("format");

return (
<>
<CardContainer header="Categories">
<Typography variant="body2" sx={{ mb: 2 }}>
Select the audience you would like to advertise to by interests.
</Typography>
<SegmentPicker idx={index} />
</CardContainer>
{format.value !== CampaignFormat.NewsDisplayAd && (
<CardContainer header="Categories">
<Typography variant="body2" sx={{ mb: 2 }}>
Select the audience you would like to advertise to by interests.
</Typography>
<SegmentPicker idx={index} />
</CardContainer>
)}

<CardContainer header="Platforms">
<Typography variant="body2" sx={{ mb: 2 }}>
Expand Down

0 comments on commit 98db640

Please sign in to comment.