diff --git a/GrossesMitaines/grosses-mitaines-ui/package-lock.json b/GrossesMitaines/grosses-mitaines-ui/package-lock.json index e5682f0..561588e 100644 --- a/GrossesMitaines/grosses-mitaines-ui/package-lock.json +++ b/GrossesMitaines/grosses-mitaines-ui/package-lock.json @@ -25,6 +25,7 @@ "react-devtools": "^4.26.0", "react-dom": "^18.2.0", "react-fontawesome": "^1.7.1", + "react-hook-form": "^7.38.0", "react-icons": "^4.6.0", "react-router-dom": "^6.4.1", "react-scripts": "^5.0.1", @@ -15344,6 +15345,21 @@ "react": ">=0.12.0" } }, + "node_modules/react-hook-form": { + "version": "7.38.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", + "integrity": "sha512-gxWW1kMeru9xR1GoR+Iw4hA+JBOM3SHfr4DWCUKY0xc7Vv1MLsF109oHtBeWl9shcyPFx67KHru44DheN0XY5A==", + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, "node_modules/react-icons": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.6.0.tgz", @@ -29471,6 +29487,12 @@ "prop-types": "^15.5.6" } }, + "react-hook-form": { + "version": "7.38.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", + "integrity": "sha512-gxWW1kMeru9xR1GoR+Iw4hA+JBOM3SHfr4DWCUKY0xc7Vv1MLsF109oHtBeWl9shcyPFx67KHru44DheN0XY5A==", + "requires": {} + }, "react-icons": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.6.0.tgz", diff --git a/GrossesMitaines/grosses-mitaines-ui/package.json b/GrossesMitaines/grosses-mitaines-ui/package.json index fb6e146..0421fe3 100644 --- a/GrossesMitaines/grosses-mitaines-ui/package.json +++ b/GrossesMitaines/grosses-mitaines-ui/package.json @@ -20,6 +20,7 @@ "react-devtools": "^4.26.0", "react-dom": "^18.2.0", "react-fontawesome": "^1.7.1", + "react-hook-form": "^7.38.0", "react-icons": "^4.6.0", "react-router-dom": "^6.4.1", "react-scripts": "^5.0.1", diff --git a/GrossesMitaines/grosses-mitaines-ui/src/pages/ContactUs.js b/GrossesMitaines/grosses-mitaines-ui/src/pages/ContactUs.js index 663a9ea..8e27e98 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/pages/ContactUs.js +++ b/GrossesMitaines/grosses-mitaines-ui/src/pages/ContactUs.js @@ -1,18 +1,63 @@ -import React from "react"; -import { useEffect } from "react"; -import ContactForm from "../components/ContactForm"; +import { useForm } from "react-hook-form"; -const ContactUs = () => { +export default function App() { + const { register, handleSubmit, watch, formState: { errors } } = useForm(); + const onSubmit = data => console.log(data); - useEffect(() => { - document.title = 'Nous contacter'; - }); + return ( + /* "handleSubmit" will validate your inputs before invoking "onSubmit" */ +
+ ); +} \ No newline at end of file diff --git a/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css b/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css index 6f5ffc9..4aba815 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css +++ b/GrossesMitaines/grosses-mitaines-ui/src/stylesheets/site.css @@ -20,6 +20,15 @@ a { text-decoration: none; } +.Contact { + background-color: beige; + text-align: center; +} + +.Error_color span { + color: red; +} + .contactUs { height: 100vh; }