diff --git a/src/app/project/apply/page.tsx b/src/app/project/apply/page.tsx index ae72c89..b4574dc 100644 --- a/src/app/project/apply/page.tsx +++ b/src/app/project/apply/page.tsx @@ -1,310 +1,26 @@ "use client"; import { useState } from "react"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { Textarea } from "@/components/ui/textarea"; +import ProjectForm from "@/components/ProjectForm"; +import { projectFormSchema } from "@/types/schemas/application.schema"; +import { z } from "zod"; +import { SubmitHandler } from "react-hook-form"; +type projectSchema = z.infer; export default function ApplyProject() { const [projectType, setProjectType] = useState([]); const [projectPitch, setProjectPitch] = useState("text"); const [applyProject, setApplyProject] = useState(false); const [selectedImages, setSelectedImages] = useState([]); const [projectPitchFile, setProjectPitchFile] = useState(""); + + const onSubmit: SubmitHandler = async (data) => { + alert("มาแน้ววว"); + console.table(data); + }; return (
- {" "}
- {/* header */} -
-

- Begin Your First Fundraising Project -

-

- Starting a fundraising project is mandatory for all businesses. This - step is crucial
- to begin your journey and unlock the necessary tools for raising - funds. -

- {/* project's name */} -
- -
- -
-
- {errorsProject.projectName && ( -

- {errorsProject.projectName.message as string} -

- )} - {/* project type */} - {/* Project type} - fieldName="projectType" - choices={projectType} - // handleFunction={handleProjectFieldChange} - description={<>Please specify the primary purpose of the funds} - placeholder="Select a Project type" - selectLabel="Project type" - /> */} - {errorsProject.projectType && ( -

- {errorsProject.projectType.message as string} -

- )} - {/* short description */} -
- -
-