summaryrefslogtreecommitdiff
blob: 80af0701001a324f694f2b72327b3933882c20a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}