auth + companies + invoice
This commit is contained in:
@@ -10,6 +10,7 @@ import { TickCircle } from 'iconsax-react'
|
||||
import { toast } from 'react-toastify'
|
||||
import { useSingleUpload } from '../../service/hooks/useServiceData'
|
||||
import { useCreateIndustry } from '../hooks/useCompanyData'
|
||||
import { ErrorType } from '../../../helpers/types'
|
||||
|
||||
type Props = {
|
||||
refetch: () => void
|
||||
@@ -45,6 +46,9 @@ const CreateIndustry: FC<Props> = ({ refetch }) => {
|
||||
onSuccess: () => {
|
||||
toast.success('صنعت با موفقیت ثبت شد')
|
||||
refetch()
|
||||
},
|
||||
onError: (error: ErrorType) => {
|
||||
toast.error(error?.response?.data?.error.message[0])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user