save optimize check state to allow page navigation

This commit is contained in:
jessop 2020-03-30 14:19:43 -04:00
parent 6c0436cf14
commit 81138e1a7a
2 changed files with 15 additions and 1 deletions

4
dist/bundle.es.js vendored
View file

@ -5492,6 +5492,10 @@ function _objectWithoutProperties$3(obj, keys) { var target = {}; for (var i in
const defaultState$6 = {
editingURI: undefined,
filePath: undefined,
checkFileDur: 0,
checkFileSize: 0,
checkFileVid: false,
canOptimize: undefined,
contentIsFree: true,
fee: {
amount: 1,

View file

@ -9,6 +9,10 @@ type PublishState = {
editingURI: ?string,
filePath: ?string,
contentIsFree: boolean,
canOptimize: ?boolean,
checkFileDur: number,
checkFileSize: number,
checkFileVid: boolean,
fee: {
amount: number,
currency: string,
@ -34,6 +38,10 @@ type PublishState = {
const defaultState: PublishState = {
editingURI: undefined,
filePath: undefined,
checkFileDur: 0,
checkFileSize: 0,
checkFileVid: false,
canOptimize: undefined,
contentIsFree: true,
fee: {
amount: 1,
@ -72,7 +80,9 @@ export const publishReducer = handleActions(
};
},
[ACTIONS.CLEAR_PUBLISH]: (state: PublishState): PublishState => ({
...defaultState, bid: state.bid, optimize: state.optimize,
...defaultState,
bid: state.bid,
optimize: state.optimize,
}),
[ACTIONS.PUBLISH_START]: (state: PublishState): PublishState => ({
...state,