diff --git a/components/Form.tsx b/components/Form.tsx index 628c456ff..1750aa7e7 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -3,6 +3,8 @@ import React from 'react'; import {Widget, WidgetType} from './Widget'; interface Field { + name: string; + label: string; widget: WidgetType; } @@ -10,7 +12,7 @@ type FormError = string[]; export type FormType = { errors: { - [name: string]: FormError; + [name: string]: FormError|null; }; fields: Field[]; } @@ -23,12 +25,22 @@ interface Props { export const Form = (props: Props) => { return