mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 13:48:37 +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);
|
window.store = createStoreWithMiddleware(rootReducer, initialState);
|
||||||
|
|
||||||
// Set the initial config state.
|
// 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
|
// TODO: This should be using `window.onload` but isn't because
|
||||||
|
@ -6,9 +6,8 @@ import ACTION_TYPES from './action-types';
|
|||||||
* @param object config
|
* @param object config
|
||||||
*/
|
*/
|
||||||
export function setConfig(config) {
|
export function setConfig(config) {
|
||||||
return (dispatch) =>
|
return {
|
||||||
dispatch({
|
type: ACTION_TYPES.SET_CONFIG,
|
||||||
type: ACTION_TYPES.SET_CONFIG,
|
payload: { config },
|
||||||
payload: { config },
|
};
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,8 @@ import ACTION_TYPES from './action-types';
|
|||||||
* @param string schema - JSON schema for the layout.
|
* @param string schema - JSON schema for the layout.
|
||||||
*/
|
*/
|
||||||
export function setSchema(schema) {
|
export function setSchema(schema) {
|
||||||
return (dispatch) =>
|
return {
|
||||||
dispatch({
|
type: ACTION_TYPES.SET_SCHEMA,
|
||||||
type: ACTION_TYPES.SET_SCHEMA,
|
payload: schema,
|
||||||
payload: schema,
|
};
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user