Skip to content

Commit

Permalink
fix: remove required layout id
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Jan 27, 2023
1 parent 6bba4ff commit e1055f2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions apps/web/src/components/templates/TemplateFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e1055f2

Please sign in to comment.