Skip to content

Commit 40db3d7

Browse files
committed
feat: typo
1 parent 6f455c5 commit 40db3d7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/forms/public/public-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { submitResponse } from '@/app/actions/forms';
2121

2222
import { FieldRenderer } from '../renderer';
2323
import { buildResponseDefaults } from './form-defaults';
24-
import { buildResponseSchema } from './response-schema';
24+
import { buildResponseSchema, ResponseFormValues } from './response-schema';
2525

2626
interface PublicFormProps {
2727
form: Form;
@@ -40,7 +40,7 @@ export const PublicForm: FC<PublicFormProps> = ({ form }) => {
4040
control,
4141
handleSubmit,
4242
formState: { isSubmitting },
43-
} = useForm({
43+
} = useForm<ResponseFormValues>({
4444
resolver: zodResolver(schema),
4545
defaultValues: defaults,
4646
});

src/components/forms/public/response-schema.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ export const buildFieldSchema = (field: FormField): z.ZodTypeAny => {
6464
return z.unknown();
6565
}
6666
};
67+
68+
export type ResponseFormValues = z.infer<
69+
ReturnType<typeof buildResponseSchema>
70+
>;

0 commit comments

Comments
 (0)