import FormLayout, { Flex, FormField, Input, Textarea, FormLabel, ButtonBlack } from "@components/UI/Form/Form"; import { FormMessage } from "@radix-ui/react-form"; import * as Form from '@radix-ui/react-form'; import React, { useState } from "react"; function NewChapterModal({ submitChapter, closeModal }: any) { const [chapterName, setChapterName] = useState(""); const [chapterDescription, setChapterDescription] = useState(""); const handleChapterNameChange = (e: any) => { setChapterName(e.target.value); }; const handleChapterDescriptionChange = (e: any) => { setChapterDescription(e.target.value); }; const handleSubmit = async (e: any) => { e.preventDefault(); console.log({ chapterName, chapterDescription }); submitChapter({ name: chapterName, description: chapterDescription, activities: [] }); }; return ( Chapter name Please provide a chapter name Chapter description Please provide a chapter description