diff --git a/package-lock.json b/package-lock.json index 9ec4e36..d1c2ac7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "nextjs-app-template", "version": "0.1.0", "dependencies": { - "@chakra-ui/react": "^2.10.3", + "@chakra-ui/react": "^2.10.5", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "framer-motion": "^11.18.0", @@ -188,9 +188,9 @@ } }, "node_modules/@chakra-ui/react": { - "version": "2.10.4", - "resolved": "https://registry.npmjs.org/@chakra-ui/react/-/react-2.10.4.tgz", - "integrity": "sha512-XyRWnuZ1Uw7Mlj5pKUGO5/WhnIHP/EOrpy6lGZC1yWlkd0eIfIpYMZ1ALTZx4KPEdbBaes48dgiMT2ROCqLhkA==", + "version": "2.10.5", + "resolved": "https://registry.npmjs.org/@chakra-ui/react/-/react-2.10.5.tgz", + "integrity": "sha512-wCetfxT1iXWNmAwSLF1d0zyTQOQYswA3YJcw05grY1XEngO6956PScRB0Or5ZQJ6rGMcz5pcUhVgrb3q7AE+gQ==", "license": "MIT", "dependencies": { "@chakra-ui/hooks": "2.4.3", @@ -7261,21 +7261,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.23", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.23.tgz", - "integrity": "sha512-zfHZOGguFCqAJ7zldTKg4tJHPJyJCOFhpoJcVxKL9BSUHScVDnMdDuOU1zPPGdOzr/GWxbhYTjyiEgLEpAoFPA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } } } } diff --git a/package.json b/package.json index bfd86a7..2a05fe8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "prepare": "husky" }, "dependencies": { - "@chakra-ui/react": "^2.10.3", + "@chakra-ui/react": "^2.10.5", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "framer-motion": "^11.18.0", diff --git a/src/app/newTreeForm/page.tsx b/src/app/newTreeForm/page.tsx index 684a201..1372a49 100644 --- a/src/app/newTreeForm/page.tsx +++ b/src/app/newTreeForm/page.tsx @@ -1,3 +1,101 @@ -export default function NewTreeForm() { - return
Will probably be made into a component later, but for now just go to /newTreeForm to develop!
; +"use client"; +import React, { useState } from "react"; +import { Box, Input, Textarea, Button, Select, VStack, Heading } from "@chakra-ui/react"; + +export default function TreeEntryForm() { + type TreeFormData = { + treeName: string; + species: string; + location: string; + description: string; + treeCondition: string; + photo: File | null; + }; + + const [formData, setFormData] = useState({ + treeName: "", + species: "", + location: "", + description: "", + treeCondition: "", + photo: null, + }); + + const [submittedData, setSubmittedData] = useState(null); + + const handleChange = (e: React.ChangeEvent) => { + const { name, value } = e.target; + setFormData((prev) => ({ + ...prev, + [name]: value, + })); + }; + + const handleFileChange = (e: React.ChangeEvent) => { + if (e.target.files && e.target.files[0]) { + setFormData((prev) => ({ + ...prev, + photo: e.target.files![0], + })); + } + }; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + setSubmittedData(formData); + }; + + return ( + + Tree Entry Form + + + + +