♻️ Refactor and remove React.FC
(#1139)
This commit is contained in:
@@ -14,15 +14,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 {
|
||||
UsersService,
|
||||
type ApiError,
|
||||
type UserOut,
|
||||
type UserUpdate,
|
||||
UsersService,
|
||||
} from "../../client"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { emailPattern } from "../../utils"
|
||||
@@ -37,7 +36,7 @@ interface UserUpdateForm extends UserUpdate {
|
||||
confirm_password: string
|
||||
}
|
||||
|
||||
const EditUser: React.FC<EditUserProps> = ({ user, isOpen, onClose }) => {
|
||||
const EditUser = ({ user, isOpen, onClose }: EditUserProps) => {
|
||||
const queryClient = useQueryClient()
|
||||
const showToast = useCustomToast()
|
||||
|
||||
|
Reference in New Issue
Block a user