From e1055f2fd2f0ec9a85d64b271c7d5824bdb381d0 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Fri, 27 Jan 2023 16:21:30 +0200 Subject: [PATCH] fix: remove required layout id --- .../src/components/templates/TemplateFormProvider.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/web/src/components/templates/TemplateFormProvider.tsx b/apps/web/src/components/templates/TemplateFormProvider.tsx index f69a90f0cd9..860f8569b2a 100644 --- a/apps/web/src/components/templates/TemplateFormProvider.tsx +++ b/apps/web/src/components/templates/TemplateFormProvider.tsx @@ -48,7 +48,7 @@ const schema = z content: z.any(), subject: z.any(), title: z.any(), - layoutId: z.any(), + layoutId: z.any().optional(), }) .passthrough() .superRefine((template: any, ctx) => { @@ -79,13 +79,6 @@ const schema = z path: ['subject'], }); } - if (!template.layoutId) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: 'Required - Layout', - path: ['layoutId'], - }); - } } if (template.type === ChannelTypeEnum.PUSH && !template.title) {