PluginProbe
Scrollsequence – Cinematic Scroll Image Animation Plugin / 1.5.5
Scrollsequence – Cinematic Scroll Image Animation Plugin v1.5.5
1.4.3 1.4.4 1.4.5 1.4.6 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 trunk 0.9.92 0.9.93 0.9.94 0.9.96 1.0.072 1.0.073 All 61 releases
scrollsequence / includes / carbonfields / htmlburger / carbon-fields / packages / blocks / store / reducer.js

reducer.js in Scrollsequence – Cinematic Scroll Image Animation Plugin 1.5.5, at includes/carbonfields/htmlburger/carbon-fields/packages/blocks/store/reducer.js

44 lines 922 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * External dependencies.
3 */
4 import { combineReducers } from '@wordpress/data';
5
6 /**
7 * The reducer that keeps track of container definitions keyed by block's name.
8 *
9 * @param {Object} state
10 * @param {Object} action
11 * @return {Object}
12 */
13 export function containerDefinitionsByBlockName( state = {}, action ) {
14 switch ( action.type ) {
15 case 'SETUP_CONTAINER_DEFINITIONS':
16 return action.payload.definitions;
17
18 default:
19 return state;
20 }
21 }
22
23 /**
24 * The reducer that keeps track of field definitions keyed by block's name.
25 *
26 * @param {Object} state
27 * @param {Object} action
28 * @return {Object}
29 */
30 export function fieldDefinitionsByBlockName( state = {}, action ) {
31 switch ( action.type ) {
32 case 'SETUP_FIELD_DEFINITIONS':
33 return action.payload.definitions;
34
35 default:
36 return state;
37 }
38 }
39
40 export default combineReducers( {
41 containerDefinitionsByBlockName,
42 fieldDefinitionsByBlockName
43 } );
44