diff --git a/app/components/general-layout.tsx b/app/components/general-layout.tsx
index f740ef1..568013c 100644
--- a/app/components/general-layout.tsx
+++ b/app/components/general-layout.tsx
@@ -174,13 +174,6 @@ export const GeneralLayout = ({ children }: React.PropsWithChildren) => {
);
};
-
-const UploadFormSchema = z.object({
- uppyFiles: z.array(z.any()).min(1, {
- message: "At least one file must be uploaded",
- }),
-});
-
const UploadFileForm = () => {
const {
getRootProps,
@@ -193,44 +186,21 @@ const UploadFileForm = () => {
upload,
} = useUppy();
- const [form, fields] = useForm({
- constraint: getZodConstraint(UploadFormSchema),
- shouldValidate: "onInput",
- onValidate: ({ formData }) => {
- const result = parseWithZod(formData, {
- schema: UploadFormSchema,
- });
- return result;
- },
- onSubmit: (e) => {
- e.preventDefault();
- return upload();
- },
- });
-
const inputProps = getInputProps();
- const files = useInputControl({
- key: fields.uppyFiles.key,
- name: fields.uppyFiles.name,
- formId: form.id
- });
const isUploading = state === "uploading";
const isCompleted = state === "completed";
const hasErrored = state === "error";
const hasStarted = state !== "idle" && state !== "initializing";
- const isValid = form.valid || getFiles().length > 0;
+ const isValid = getFiles().length > 0;
const getFailedState = (id: string) =>
failedFiles.find((file) => file.id === id);
- console.log({ files: getFiles() });
-
return (
<>