Skip to content

Commit

Permalink
fix: hide in review
Browse files Browse the repository at this point in the history
  • Loading branch information
IanKrieger committed Nov 6, 2023
1 parent 98db640 commit 1bf7113
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Props {
errors?: string | FormikErrors<AdSetForm>;
}

export function AdSetReview({ adSet, idx, errors }: Props) {
export function AdSetReview({ adSet, idx, errors, format }: Props) {
const included = adSet.creatives.filter((c) => c.included);
const hasErrors = !!errors;
if (typeof errors === "string") {
Expand All @@ -37,11 +37,13 @@ export function AdSetReview({ adSet, idx, errors }: Props) {
value={adSet.name || `Ad Set ${idx + 1}`}
error={hasErrors ? adSetError?.name : ""}
/>
<ReviewField
caption="Audiences"
value={segmentValue(mapToString(adSet.segments))}
error={hasErrors ? (adSetError?.segments as string) : ""}
/>
{format !== CampaignFormat.NewsDisplayAd && (
<ReviewField
caption="Audiences"
value={segmentValue(mapToString(adSet.segments))}
error={hasErrors ? (adSetError?.segments as string) : ""}
/>
)}
<ReviewField
caption="Platforms"
value={mapToString(adSet.oses)}
Expand Down

0 comments on commit 1bf7113

Please sign in to comment.