added title in add aboutus
This commit is contained in:
parent
be06a0783f
commit
dadc2cec38
|
@ -16,6 +16,7 @@ import {
|
|||
NumberInputStepper,
|
||||
NumberIncrementStepper,
|
||||
NumberDecrementStepper,
|
||||
Input,
|
||||
} from "@chakra-ui/react"
|
||||
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
|
@ -82,6 +83,7 @@ const AddAboutUs = ({ isOpen, onClose }: AddAboutUsProps) => {
|
|||
criteriaMode: "all",
|
||||
defaultValues: {
|
||||
index: 0,
|
||||
title: "",
|
||||
description: "",
|
||||
image: undefined,
|
||||
},
|
||||
|
@ -149,6 +151,20 @@ const AddAboutUs = ({ isOpen, onClose }: AddAboutUsProps) => {
|
|||
<ModalCloseButton />
|
||||
|
||||
<ModalBody pb={30}>
|
||||
<FormControl isRequired isInvalid={!!errors.title}>
|
||||
<FormLabel htmlFor="title">Title</FormLabel>
|
||||
<Input
|
||||
id="title"
|
||||
{...register("title", {
|
||||
required: "Title is required.",
|
||||
})}
|
||||
placeholder="Title"
|
||||
type="text"
|
||||
/>
|
||||
{errors.title && (
|
||||
<FormErrorMessage>{errors.title.message}</FormErrorMessage>
|
||||
)}
|
||||
</FormControl>
|
||||
<FormControl isRequired isInvalid={!!errors.description}>
|
||||
<Editor
|
||||
editorState={editorState}
|
||||
|
|
Loading…
Reference in New Issue