ComposeEventModal: Set is_uploading to false after successsfully uploading banner

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-12-09 19:54:25 +01:00
parent fc728f4b1a
commit 24b5f0bf28

View file

@ -71,7 +71,9 @@ export default function compose_event(state = ReducerRecord(), action: AnyAction
case EVENT_BANNER_UPLOAD_REQUEST:
return state.set('is_uploading', true);
case EVENT_BANNER_UPLOAD_SUCCESS:
return state.set('banner', normalizeAttachment(fromJS(action.media)));
return state
.set('banner', normalizeAttachment(fromJS(action.media)))
.set('is_uploading', false);
case EVENT_BANNER_UPLOAD_FAIL:
return state.set('is_uploading', false);
case EVENT_BANNER_UPLOAD_UNDO: