This commit is contained in:
@@ -9,7 +9,7 @@ import Button from '../../../../components/Button'
|
||||
import { useAddAdminRestaurant, useGetSystemRoles } from '../../hooks/useIconData'
|
||||
import { SystemRoleType } from '../../types/Types'
|
||||
import { ErrorType } from '../../../../helpers/types'
|
||||
import { toast } from 'react-toastify'
|
||||
import { toast } from '../../../../components/Toast';
|
||||
import { TickCircle } from 'iconsax-react'
|
||||
|
||||
interface AddRestaurantAdminFormProps {
|
||||
@@ -46,13 +46,13 @@ const AddRestaurantAdminForm: FC<AddRestaurantAdminFormProps> = ({
|
||||
onSubmit: (values) => {
|
||||
addAdmin(values, {
|
||||
onSuccess: () => {
|
||||
toast.success(t('success'))
|
||||
toast(t('success'), 'success')
|
||||
formik.resetForm()
|
||||
onSuccess()
|
||||
onClose()
|
||||
},
|
||||
onError: (error: ErrorType) => {
|
||||
toast.error(error.response?.data?.error?.message[0])
|
||||
toast(error.response?.data?.error?.message[0], 'error')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user