From 9d12b042ae26206b0edda26dee30e62a7880a168 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Wed, 11 May 2022 20:17:42 +0430 Subject: [PATCH] fixed comment confirm --- src/redux/reducers/comment.js | 11 ++++++++--- src/redux/reducers/userAddress.js | 1 + src/redux/reducers/userFavorite.js | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/redux/reducers/comment.js b/src/redux/reducers/comment.js index 4a29038..9bbb3cb 100644 --- a/src/redux/reducers/comment.js +++ b/src/redux/reducers/comment.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,11 +33,10 @@ 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: return state; } -} \ No newline at end of file +} diff --git a/src/redux/reducers/userAddress.js b/src/redux/reducers/userAddress.js index e61407f..52c4fb8 100644 --- a/src/redux/reducers/userAddress.js +++ b/src/redux/reducers/userAddress.js @@ -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: diff --git a/src/redux/reducers/userFavorite.js b/src/redux/reducers/userFavorite.js index 8ff60f8..7505650 100644 --- a/src/redux/reducers/userFavorite.js +++ b/src/redux/reducers/userFavorite.js @@ -1,4 +1,3 @@ -import { toastMessage } from "../../utils/message"; import { asyncAwesomeAlert } from "../../utils/AsyncWrappers"; const initialState = {