This commit is contained in:
@@ -12,7 +12,7 @@ import moment from 'moment-jalaali'
|
||||
import ToggleStatusDiscount from './components/ToggleStatusDiscount'
|
||||
import PageLoading from '../../components/PageLoading'
|
||||
import { NumberFormat } from '../../config/func'
|
||||
import { toast } from 'react-toastify'
|
||||
import { toast } from '../../components/Toast';
|
||||
import { ErrorType } from '../../helpers/types'
|
||||
|
||||
const DiscountList: FC = () => {
|
||||
@@ -26,10 +26,10 @@ const DiscountList: FC = () => {
|
||||
deleteDiscount.mutate(id, {
|
||||
onSuccess: () => {
|
||||
getDiscounts.refetch()
|
||||
toast.success(t('success'))
|
||||
toast(t('success'), 'success')
|
||||
},
|
||||
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