diff --git a/src/components/Creatives/CreateCreativeButton.tsx b/src/components/Creatives/CreateCreativeButton.tsx index 4b7344059..d16514c87 100644 --- a/src/components/Creatives/CreateCreativeButton.tsx +++ b/src/components/Creatives/CreateCreativeButton.tsx @@ -50,6 +50,11 @@ export function CreateCreativeButton({ index }: Props) { ], }); + const creative = validCreativeFields( + { ...newMeta.value, id: "" }, + advertiser.id, + ); + return ( { const { isValid } = urlValidation; diff --git a/src/user/views/adsManager/types/index.ts b/src/user/views/adsManager/types/index.ts index af5cf26dd..5d74d2c50 100644 --- a/src/user/views/adsManager/types/index.ts +++ b/src/user/views/adsManager/types/index.ts @@ -89,19 +89,6 @@ export const initialCreative: Creative = { advertiserId: "", // eslint-disable-next-line lingui/no-unlocalized-strings targetUrlValid: "Target URL validation incomplete", - payloadNotification: { - title: "", - targetUrl: "", - body: "", - }, - payloadInlineContent: { - ctaText: "", - description: "", - dimensions: "900x750", - imageUrl: "", - targetUrl: "", - title: "", - }, type: { code: "" }, state: "draft", included: false, diff --git a/src/validation/CreativeSchema.tsx b/src/validation/CreativeSchema.tsx index 28159e124..f2e4d04f8 100644 --- a/src/validation/CreativeSchema.tsx +++ b/src/validation/CreativeSchema.tsx @@ -60,7 +60,9 @@ export const CreativeSchema = () => .max(15, t`Call to action must be less than 15 characters`) .required(t`Call to action is required`), description: string().required(t`Ad description is required`), - dimensions: string().required(t`Ad image dimensions are required`), + dimensions: string() + .required(t`Ad image dimensions are required`) + .default("900x750"), imageUrl: string() .url(t`Image URL must be valid`) .required()