diff options
Diffstat (limited to 'plugins/jetpack/extensions/blocks/publicize/store/reducer.js')
-rw-r--r-- | plugins/jetpack/extensions/blocks/publicize/store/reducer.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/jetpack/extensions/blocks/publicize/store/reducer.js b/plugins/jetpack/extensions/blocks/publicize/store/reducer.js new file mode 100644 index 00000000..80af0701 --- /dev/null +++ b/plugins/jetpack/extensions/blocks/publicize/store/reducer.js @@ -0,0 +1,18 @@ +/** + * Reducer managing Publicize connection test results. + * + * @param {Object} state Current state. + * @param {Object} action Dispatched action. + * + * @return {Object} Updated state. + */ +export default function( state = [], action ) { + switch ( action.type ) { + case 'SET_CONNECTION_TEST_RESULTS': + return action.results; + case 'REFRESH_CONNECTION_TEST_RESULTS': + return []; + } + + return state; +} |