From eaeb432fe6bcef0c84346045004b438c08c19f42 Mon Sep 17 00:00:00 2001 From: Francesco Manzali Date: Tue, 19 Oct 2021 10:43:42 +0200 Subject: [PATCH] Fix import on useForm + validate e-mail --- web/src/pages/ContactPage/ContactPage.js | 136 ++++++++++++----------- 1 file changed, 71 insertions(+), 65 deletions(-) diff --git a/web/src/pages/ContactPage/ContactPage.js b/web/src/pages/ContactPage/ContactPage.js index 65a066e..f91cded 100644 --- a/web/src/pages/ContactPage/ContactPage.js +++ b/web/src/pages/ContactPage/ContactPage.js @@ -6,10 +6,10 @@ import { FieldError, Label, FormError, + useForm, } from '@redwoodjs/forms' import { useMutation } from '@redwoodjs/web' import { toast, Toaster } from '@redwoodjs/web/toast' -import { useForm } from 'react-hook-form' const CREATE_CONTACT = gql` mutation CreateContactMutation($input: CreateContactInput!) { @@ -34,75 +34,81 @@ const ContactPage = () => { console.log(data) } - return <> - -
- + + - - - + + + + - - - + + + - - - + + + - - Save - - - ; + + Save + + + + ) } export default ContactPage