fixed comment confirm

master
Reza_ashrafi 3 years ago
parent 588af7f6b2
commit 9d12b042ae
  1. 9
      src/redux/reducers/comment.js
  2. 1
      src/redux/reducers/userAddress.js
  3. 1
      src/redux/reducers/userFavorite.js

@ -1,3 +1,5 @@
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
const initialState = {
loading: false,
error: null,
@ -12,6 +14,10 @@ export default function comment(state = initialState, action) {
case "comment/update":
return { ...state, loading: false, error: null };
case "comment/add":
asyncAwesomeAlert("نتیجه", "کامنت شما با موفقیت ثبت شد.", {
confirmText: "باشه",
showCancelButton: false,
});
return { ...state, loading: false, error: null };
case "comment/delete":
return { ...state, loading: false, error: null };
@ -27,8 +33,7 @@ export default function comment(state = initialState, action) {
case "comment/error":
asyncAwesomeAlert("خطا", data.message, {
showCancelButton: false,
confirmText: "باشه"
confirmText: "باشه",
});
return { ...state, loading: false, error: data.message };
default:

@ -28,6 +28,7 @@ export default function userAddress(state = initialState, action) {
case "userAddress/error":
asyncAwesomeAlert("خطا", data.message, {
confirmText: "باشه",
showCancelButton: false,
});
return { ...state, loading: false, error: data.message };
default:

@ -1,4 +1,3 @@
import { toastMessage } from "../../utils/message";
import { asyncAwesomeAlert } from "../../utils/AsyncWrappers";
const initialState = {

Loading…
Cancel
Save