mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 05:39:10 +02:00
Removed unnecessary thunk wrapper in actions
This commit is contained in:
parent
f9d5b0db97
commit
097d7ee6d3
@ -26,7 +26,7 @@ function appBoot() {
|
||||
window.store = createStoreWithMiddleware(rootReducer, initialState);
|
||||
|
||||
// Set the initial config state.
|
||||
configActions.setConfig(window.ss.config)(window.store.dispatch);
|
||||
window.store.dispatch(configActions.setConfig(window.ss.config));
|
||||
}
|
||||
|
||||
// TODO: This should be using `window.onload` but isn't because
|
||||
|
@ -6,9 +6,8 @@ import ACTION_TYPES from './action-types';
|
||||
* @param object config
|
||||
*/
|
||||
export function setConfig(config) {
|
||||
return (dispatch) =>
|
||||
dispatch({
|
||||
type: ACTION_TYPES.SET_CONFIG,
|
||||
payload: { config },
|
||||
});
|
||||
return {
|
||||
type: ACTION_TYPES.SET_CONFIG,
|
||||
payload: { config },
|
||||
};
|
||||
}
|
||||
|
@ -6,9 +6,8 @@ import ACTION_TYPES from './action-types';
|
||||
* @param string schema - JSON schema for the layout.
|
||||
*/
|
||||
export function setSchema(schema) {
|
||||
return (dispatch) =>
|
||||
dispatch({
|
||||
type: ACTION_TYPES.SET_SCHEMA,
|
||||
payload: schema,
|
||||
});
|
||||
return {
|
||||
type: ACTION_TYPES.SET_SCHEMA,
|
||||
payload: schema,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user