From b185823d0cc5a0158909834abdf70b2c420f406a Mon Sep 17 00:00:00 2001 From: BrickheadJohnny Date: Tue, 26 Nov 2024 15:07:02 +0100 Subject: [PATCH] fix: ImageUrlSchema --- .../create-guild/components/CreateGuildFormProvider.tsx | 1 + src/lib/schemas/common.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx b/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx index b1cc73d122..9ffac2ab90 100644 --- a/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx +++ b/src/app/(dashboard)/create-guild/components/CreateGuildFormProvider.tsx @@ -10,6 +10,7 @@ const defaultValues = { imageUrl: "", urlName: "test", contact: "", + description: "", } satisfies CreateGuildForm; const CreateGuildFormProvider = ({ children }: PropsWithChildren) => { diff --git a/src/lib/schemas/common.ts b/src/lib/schemas/common.ts index 36ce381d31..43f6779f29 100644 --- a/src/lib/schemas/common.ts +++ b/src/lib/schemas/common.ts @@ -4,7 +4,7 @@ export const NameSchema = z .string() .max(255, "Maximum name length is 255 characters"); -export const ImageUrlSchema = z.string().url().max(255); +export const ImageUrlSchema = z.literal("").or(z.string().url().max(255)); export const LogicSchema = z.enum(["AND", "OR", "ANY_OF"]);