diff --git a/client/package-lock.json b/client/package-lock.json index df504a9..4702bcc 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -18,6 +18,7 @@ "react": "^19.1.0", "react-dom": "^19.1.0", "react-grid-layout": "^1.5.2", + "react-hook-form": "^7.62.0", "react-icons": "^5.5.0", "react-leaflet": "^5.0.0", "react-resizable": "^3.0.5", @@ -4302,6 +4303,22 @@ "react-dom": ">= 16.3.0" } }, + "node_modules/react-hook-form": { + "version": "7.62.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.62.0.tgz", + "integrity": "sha512-7KWFejc98xqG/F4bAxpL41NB3o1nnvQO1RWZT3TqRZYL8RryQETGfEdVnJN2fy1crCiBLLjkRBVK05j24FxJGA==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18 || ^19" + } + }, "node_modules/react-icons": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.5.0.tgz", diff --git a/client/package.json b/client/package.json index 01c5bc5..9cf3193 100644 --- a/client/package.json +++ b/client/package.json @@ -20,6 +20,7 @@ "react": "^19.1.0", "react-dom": "^19.1.0", "react-grid-layout": "^1.5.2", + "react-hook-form": "^7.62.0", "react-icons": "^5.5.0", "react-leaflet": "^5.0.0", "react-resizable": "^3.0.5", diff --git a/client/src/components/layout/Canvas/views/AccountCanvas.jsx b/client/src/components/layout/Canvas/views/AccountCanvas.jsx index 211606f..ef1465d 100644 --- a/client/src/components/layout/Canvas/views/AccountCanvas.jsx +++ b/client/src/components/layout/Canvas/views/AccountCanvas.jsx @@ -1,24 +1,75 @@ -import { Box, Text } from '@chakra-ui/react'; +import { Box, Flex, Field, Input, Stack, Heading, Button } from "@chakra-ui/react" +import { useForm } from 'react-hook-form'; + +export default function AccountCanvas() { + const { + register, + handleSubmit, + watch, + formState: { errors }, + } = useForm(); + + const onSubmit = (data) => { + console.log("Form submitted:", data); + } + + console.log(watch("example")); // watch input value by passing the name of it -export default function AccountCanvas() { return ( - + + Account + - - Account Canvas coming soon! - + {/* + Account + */} + + + + User Name + + + + + First Name + + + + + Last Name + + + + + Email + + + + + + - - ); -} \ No newline at end of file + + ) +}