|
@ -14,11 +14,10 @@ import { |
|
|
ModalHeader, |
|
|
ModalHeader, |
|
|
ModalOverlay, |
|
|
ModalOverlay, |
|
|
} from "@chakra-ui/react" |
|
|
} from "@chakra-ui/react" |
|
|
import type React from "react" |
|
|
import { useForm, type SubmitHandler } from "react-hook-form" |
|
|
import { type SubmitHandler, useForm } from "react-hook-form" |
|
|
|
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
import { useMutation, useQueryClient } from "react-query" |
|
|
|
|
|
|
|
|
import { type UserCreate, UsersService } from "../../client" |
|
|
import { UsersService, type UserCreate } from "../../client" |
|
|
import type { ApiError } from "../../client/core/ApiError" |
|
|
import type { ApiError } from "../../client/core/ApiError" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import useCustomToast from "../../hooks/useCustomToast" |
|
|
import { emailPattern } from "../../utils" |
|
|
import { emailPattern } from "../../utils" |
|
@ -32,7 +31,7 @@ interface UserCreateForm extends UserCreate { |
|
|
confirm_password: string |
|
|
confirm_password: string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const AddUser: React.FC<AddUserProps> = ({ isOpen, onClose }) => { |
|
|
const AddUser = ({ isOpen, onClose }: AddUserProps) => { |
|
|
const queryClient = useQueryClient() |
|
|
const queryClient = useQueryClient() |
|
|
const showToast = useCustomToast() |
|
|
const showToast = useCustomToast() |
|
|
const { |
|
|
const { |
|
|