♻️ Refactor and remove React.FC (#1139)
This commit is contained in:
@@ -12,15 +12,14 @@ import {
|
||||
ModalHeader,
|
||||
ModalOverlay,
|
||||
} from "@chakra-ui/react"
|
||||
import type React from "react"
|
||||
import { type SubmitHandler, useForm } from "react-hook-form"
|
||||
import { useForm, type SubmitHandler } from "react-hook-form"
|
||||
|
||||
import { useMutation, useQueryClient } from "react-query"
|
||||
import {
|
||||
ItemsService,
|
||||
type ApiError,
|
||||
type ItemOut,
|
||||
type ItemUpdate,
|
||||
ItemsService,
|
||||
} from "../../client"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
|
||||
@@ -30,7 +29,7 @@ interface EditItemProps {
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const EditItem: React.FC<EditItemProps> = ({ item, isOpen, onClose }) => {
|
||||
const EditItem = ({ item, isOpen, onClose }: EditItemProps) => {
|
||||
const queryClient = useQueryClient()
|
||||
const showToast = useCustomToast()
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user