diff --git a/pkgs/ui/src/app/machines/add/page.tsx b/pkgs/ui/src/app/machines/add/page.tsx index 6413c3c88..3581d0006 100644 --- a/pkgs/ui/src/app/machines/add/page.tsx +++ b/pkgs/ui/src/app/machines/add/page.tsx @@ -1,64 +1,7 @@ "use client"; -import { useForm } from "react-hook-form"; - -import { JSONSchema7 } from "json-schema"; -import { useMemo, useState } from "react"; -import { schema } from "./schema"; -import Form from "@rjsf/mui"; -import validator from "@rjsf/validator-ajv8"; -import { Button } from "@mui/material"; - -interface CreateMachineFormProps { - schema: JSONSchema7; - initialValues: any; -} - -const defaultValues = Object.entries(schema.properties || {}).reduce( - (acc, [key, value]) => { - /*@ts-ignore*/ - const init: any = value?.default; - if (init) { - return { - ...acc, - [key]: init, - }; - } - return acc; - }, - {}, -); - -function CreateMachineForm(props: CreateMachineFormProps) { - const { schema, initialValues } = props; - - return ( -