mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Clear uploaded image data from store after submit
This commit is contained in:
parent
c942f3b598
commit
040a111346
1 changed files with 3 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import { currentUserShowSuccess } from '../../ducks/user.duck';
|
|||
|
||||
// ================ Action types ================ //
|
||||
|
||||
export const CLEAR_UPDATED_FORM = 'app/EditListingPage/CLEAR_UPDATED_FORM';
|
||||
export const CLEAR_UPDATED_FORM = 'app/ProfileSettingsPage/CLEAR_UPDATED_FORM';
|
||||
|
||||
export const UPLOAD_IMAGE_REQUEST = 'app/ProfileSettingsPage/UPLOAD_IMAGE_REQUEST';
|
||||
export const UPLOAD_IMAGE_SUCCESS = 'app/ProfileSettingsPage/UPLOAD_IMAGE_SUCCESS';
|
||||
|
|
@ -55,11 +55,13 @@ export default function reducer(state = initialState, action = {}) {
|
|||
case UPDATE_PROFILE_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
image: null,
|
||||
updateInProgress: false,
|
||||
};
|
||||
case UPDATE_PROFILE_ERROR:
|
||||
return {
|
||||
...state,
|
||||
image: null,
|
||||
updateInProgress: false,
|
||||
updateProfileError: payload,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue