client/src/store/configureStore.js
changeset 72 7634b424f426
parent 68 6e18b31b0ad5
child 74 043477fd5c5c
equal deleted inserted replaced
71:75dc1e794cf4 72:7634b424f426
    26   sessions: Immutable.List([]),
    26   sessions: Immutable.List([]),
    27   notes: Immutable.List([]),
    27   notes: Immutable.List([]),
    28   isAuthenticated: false,
    28   isAuthenticated: false,
    29   currentUser: null,
    29   currentUser: null,
    30   token: '',
    30   token: '',
       
    31   autoSubmit: false,
    31   login: Immutable.Map({
    32   login: Immutable.Map({
    32     loading: false,
    33     loading: false,
    33     success: false,
    34     success: false,
    34     error: false,
    35     error: false,
    35   })
    36   })
    41 }
    42 }
    42 
    43 
    43 const persistOptions = {
    44 const persistOptions = {
    44   storage: localForage,
    45   storage: localForage,
    45   transforms: [immutableTransform(immutableTransformConfig)],
    46   transforms: [immutableTransform(immutableTransformConfig)],
    46   whitelist: ['sessions', 'notes', 'isAuthenticated', 'currentUser', 'token', 'offline']
    47   whitelist: ['sessions', 'notes', 'isAuthenticated', 'currentUser', 'token', 'offline', 'autoSubmit']
    47 }
    48 }
    48 
    49 
    49 const apiClient = new APIClient(config.apiRootUrl);
    50 const apiClient = new APIClient(config.apiRootUrl);
    50 
    51 
    51 const offlineConfig = {
    52 const offlineConfig = {