This commit is contained in:
@@ -9,7 +9,7 @@ import { Pages } from '../../config/Pages'
|
||||
import { useDeleteUser, useGetUsers } from './hooks/useUserData'
|
||||
import { UserItemType } from './types/UserTypes'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import { toast } from 'react-toastify'
|
||||
import { toast } from '../../components/Toast';
|
||||
import { ErrorType } from '../../helpers/types'
|
||||
import Pagination from '../../components/Pagination'
|
||||
const UsersList: FC = () => {
|
||||
@@ -24,11 +24,11 @@ const UsersList: FC = () => {
|
||||
const handleDeleteUser = (id: string) => {
|
||||
deleteUser.mutate(id, {
|
||||
onSuccess: () => {
|
||||
toast.success(t('success'))
|
||||
toast(t('success'), 'success')
|
||||
getUsers.refetch()
|
||||
},
|
||||
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